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
Exit early on error (#4220) #4658
Conversation
} | ||
catch (Exception) | ||
{ | ||
Environment.ExitCode = -1; |
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.
Don't we want to have more complex exit code differentiation here?
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 sure don't want to add complexity. I'd recommend adding them when you need.
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.
It seems that recent change when calling Environment.Exit hangs. Added an IExceptionWithExitCode.
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.
Isn't Exception.HResult
potentially enough?
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.
Did not realize that exist. it seems the range of that value is much largher. Probably not good for this use case.
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.
Yes it might get trimmed, but when we control it it should be enough?
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.
Dont know the semantic of that code.
@asdacap please check Lukasz comments. |
@jmederosalvarado this issue was raised some time ago by Lion. Do we want to include in the Gnosis branch or after the Gnosis merge? |
Exit early on error in steps except for step with "mustInitialize" set to false.
cb62a5a
to
a0d2fde
Compare
* Exit early on error (NethermindEth#4220) Exit early on error in steps except for step with "mustInitialize" set to false. * Fix hanging on exit * Fix exitcode not forwarded * Rollback unintended commit * Trying to invoke build * Fix build Co-authored-by: Amirul Ashraf <asdacap@gmail.com>
Created from #4220