-
Notifications
You must be signed in to change notification settings - Fork 27
Catch exceptions in main #222
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
base: dev
Are you sure you want to change the base?
Conversation
|
3cc9b98 to
1fd8b85
Compare
1fd8b85 to
7dd4644
Compare
| + " during the execution of the ${grammarname}Tool." | ||
| + System.lineSeparator() + "This error is unexpected" | ||
| + " and does not indicate an issue with any provided models.", | ||
| exception |
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.
Das Ganze führt jetzt zu dem Unterschied, dass Errors in der Ausführung mit Exit Code 0 (aka "alles gut") beendet werden.
Wenn wir den Change schon machen -> Rückgabewert zu int Ändern und fail=1/okay=0 zurückgeben?
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.
Wie möchtest du den Rückgabewert von main ändern?
Ich würde System.exit eher vermeiden wollen, es sei denn, wir entfernen (lese: passen an) jeden Test, der zurzeit direkt die main Methode testet.
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.
Discussed in MC Weekly:
Add System.exit, change all the tests that call main to call run instead.
@luepges our gradle plugins should be fine?
No description provided.