-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
The next() function handed to calls to init(), start() and stop() should have an argument for indicating an error. So you can do something like:
start: function(next) {
someFunctionReturningAPromise().then(function() {
throw new Error('something bad! D: D:');
next();
}).catch(function(err) {
next(err);
});
}
This above should then attempt to shut down all previously started dependencies. If there's an error in a service's stop(), it will just have to be aborted and continue stopping other dependencies. After the full shutdown, either all errors or the first should be thrown, so as to notify the user what's happened
As far as I can tell there's no process for handling errors (especially asynchronous ones) at the moment
I can happily work on this myself or help out. Lemme know your thoughts
Metadata
Metadata
Assignees
Labels
No labels