-
Notifications
You must be signed in to change notification settings - Fork 24
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
Properly expose SCIP error codes to users. #78
Comments
See also MathOptInterface.jl/error.jl |
the errors appear also in opt mode |
I'm not sure we will get a full stacktrace anyway if there is no error on the SCIP side, just a return code. We could just send a warning when the return code is not SCIP_OKAY, but I'm not sure there are many cases where a different retcode should not result in an error |
I'm not sure what you mean with:
If I remember correctly, SCIP only uses return codes to do error handling, but the I guess in the context of SCIP.jl, the most likely case would be an invalid stage. I don't think that these can be "dealt with" completely in the wrapper, so the user should at least get meaningful information for what happened and how to resolve the issue. |
OK I see. So the goal would be to print the code before throwing an error instead of the assert in the macro? |
For example, or even have SCIP print its internal stack trace. Not sure whether that would be helpful to the typical user of SCIP.jl, but it would definitely be convenient for users with SCIP experience. |
This applies to the rewrite (after #76 is merged).
Currently, the simple
@SC
macro is used everywhere, where on would useSCIP_CALL
in C.It only does an
@assert
to check that the return code isSCIP_OKAY
.It would be better to throw a custom exception, also explaining what happened.
Not sure if we can actually show the full stacktrace (including the SCIP calls). I believe this requires compiling SCIP in debug mode?
cc @fserra
The text was updated successfully, but these errors were encountered: