-
Notifications
You must be signed in to change notification settings - Fork 15
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
Remove process.exit commands #467
Conversation
@@ -82,16 +83,25 @@ export async function interpretModel( | |||
', ', | |||
)}.`, | |||
); | |||
process.exit(ExitCode.FAILURE); | |||
return ExitCode.FAILURE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should distinguish between different kinds of FAILURES
, like CONFIGURATION_FAILURE
, RUNTIME_FAILURE
, RUNTIME_ERROR
, and so on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good, yeah. Note though, this is the exit code of the process so we can not freely define new ones (afaik). We definitely should have some form of more elaborate error output outside of the exit code though, like writing a logfile.
I want to draft a release after integrating this. Should we do version |
I am not sure this doesn't change behavior. Was the cli-interpreter always also just returning exit code 1? Because otherwise, this is also a change in functionality that would mean 0.2.0 imho. But if there is no behavior change we should go with 0.1.1 and trust the tests I think? Maybe in the future we should do some MADE only releases (e.g. release v.WS2324.MADE) so we can be more flexible with keeping a stable version for MADE and still release new versions for general users. |
In the
interpreter-lib
, there were still someprocess.exit
commands. IMO, only surrounding applications should trigger a process exit.The details of the
FAILURE
are logged / can be extracted by injecting a custom logger.