lib-checked-domain
v0.0.0
Published
Handle typed domain exceptions
Downloads
4
Readme
checked domain
Handle typed domain exceptions
install
npm install --save lib-checked-domain
usage
Catch known types, or throw when the type is unknown.
check(function () {
// throw a *typed* exception
throw check.Error('exit', 'bad exit')
})
.on('fail', function () {
// handle 'fail' type
})
.on('exit', function () {
// handle 'exit' type
})