bragg
bragg copied to clipboard
Emit events on error
At this moment, the errors are always logged and the stack trace is logged if error.expose is false. https://github.com/SamVerschueren/bragg/blob/master/context.js#L28-L32
Instead, we should use the EventEmitter and let the user subscribe on error events and let them handle the logging.
var bragg = require('bragg');
var app = bragg();
app.on('error', function (err) {
console.log(err);
});