feat: re-throw error in default serviceErrorHandler#1153
Conversation
This makes errors bubble up to `await CommandFactory.run(...);` like they should
|
|
This should be merged. Currently it make all scripts fails silently which is a big issue |
|
@SystemDisc can you resolve the conflicts and add a changeset by following |
| if (!this.options.serviceErrorHandler) { | ||
| this.options.serviceErrorHandler = (err: Error) => | ||
| this.options.serviceErrorHandler = async (err: Error) => { | ||
| process.stderr.write(err.toString()); |
There was a problem hiding this comment.
If it bubbles the error, should printing it not be the responsibility of the caller? I.e. adding console.error(err) to the catch block in main.ts.
This makes errors bubble up to
await CommandFactory.run(...);like they should.Example code utilizing new behavior: