atbar
Version:
Async callback manager for javascript in nodejs and browser
18 lines • 509 B
JavaScript
/*
coffee -cb /opt/node/bb/dev/node_modules/atbar/atbar.cof
coffee -cb /opt/node/bb/dev/node_modules/atbar/tests/throw-error.cof
*/var atbar;
atbar = require('atbar');
atbar.run('trace', function() {
this._(function() {
return setTimeout(this.$(), 2000);
});
this._(function() {
throw 'I am a real javascript exception';
});
return this._(function() {
return console.log('you should not see this');
});
}, function(err, resp) {
return console.log('atbar final callback: ' + err);
});