New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't kill the node process upon unexpected error #483
Comments
I agree... I'm not sure why we ever started killing the process. One thing though is that it might make sense to change the error's |
@ariporad Do you want to take this on? I imagine we'll just want to keep whatever the stack is from before, and maybe also add in a message like "ShellJS internal error" on the top of the stack trace. |
Fixed on |
#64 and #473 are examples of complaints about this.
Currently, ShellJS will kill the process if it encounters an unexpected ("internal") error. Ideally, the commands should all catch these before they arise, but since nothing is ever perfect so sometimes utilities fail for various reasons (permissions errors are a big reason).
It'd be great if ShellJS threw an exception instead of killing the process, since this would at least allow users the chance to catch the exception in their code. If the exception is left uncaught at the top-level, this would kill the process anyway as it currently does. This could have significantly different behavior if thrown inside of a try-catch, however, so this would be a breaking change.
The text was updated successfully, but these errors were encountered: