-
Notifications
You must be signed in to change notification settings - Fork 4
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
application does not return non-zero code upon failure #3
Comments
I take it that this should read:
And that the If that is the case it looks like this is an upstream issue and I will pass it on. |
On second look this might be me. I'll try and find a return code and pass it up. |
And it turns out when passing up a return code the OpenCOR Python module is causing a segmentation fault which is an upstream problem. I'll pass this one on. |
Yes, sorry, that was a typo :-) it returns 0 |
Great, upstream issue is dbrnz/opencor#27 |
Fixed in version 0.2.2 of the image. |
Application run does return non-zero code upon failure.
Steps to reproduce
Running w/o arguments displays help and exit code 1
Running w/ arguments runs through and returns exit code 0
Running w/ an invalid input runs though, reports error message in the
std::err
BUT still returns exit code 0In this case, the expected behavior would be to get a non-zero. This way, the client can detect that something went wrong and e.g. show the user the
std::err
Some insight
In order to understand better this, I built myself the image and tagged as
opencor-python:dev
, run the container and executed the command in theentrypoint.sh
.$ docker run -it --entrypoint /bin/bash opencor-python:dev
I noticed that i can reproduce the same in the executable
See that python interpreter, would return 1 if there is an exception raised:
The text was updated successfully, but these errors were encountered: