"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const assert = require("assert");
const debug_1 = require("../../../../debug");
const Throw_1 = require("../../../../system/f/control/Throw");
const Catch_1 = require("../../../../system/f/meta/Catch");
const system_1 = require("../../../util/system");
const _catch = new Catch_1.default(system_1.system);
const _throw = new Throw_1.default(system_1.system);
_catch.play();
_throw.play();
false && (0, debug_1.watchUnitAndLog)(_catch);
false && (0, debug_1.watchUnitAndLog)(_throw);
_throw.push('message', 'bafum!');
assert.equal(_throw.getErr(), 'bafum!');
_catch.push('unit', _throw);
assert.equal(_throw.getErr(), null);
assert.equal(_throw.caughtErr(), 'bafum!');
assert.equal(_catch.peak('err'), 'bafum!');
assert.equal(_catch.take('err'), 'bafum!');
assert.equal(_throw.caughtErr(), null);
_throw.push('message', 'grrr!');
assert.equal(_throw.getErr(), null);
assert.equal(_throw.caughtErr(), 'grrr!');
assert.equal(_catch.peak('err'), 'grrr!');
_catch.takeInput('unit');
assert.equal(_catch.peak('err'), null);
assert.equal(_throw.getErr(), 'grrr!');
_catch.push('unit', _throw);
assert.equal(_throw.getErr(), null);
assert.equal(_throw.caughtErr(), 'grrr!');
assert.equal(_catch.peak('err'), 'grrr!');
assert.equal(_catch.take('err'), 'grrr!');
assert.equal(_throw.caughtErr(), null);
//# sourceMappingURL=Catch.js.map