-
Notifications
You must be signed in to change notification settings - Fork 304
Improving Exception Handling in acados Python Template #1478
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
Conversation
|
Thanks for the PR! |
….py to more specific types
…, and acados_sim_solver.py to more specific types
…py, penalty_utils.py, and zoro_description.py to more specific types
…ver_pyx.pyx to more specific types
|
@FreyJo Hi FreyJo, I believe I have changed all Exceptions in the python template to a more specific one. Could you please review them? |
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.
Thanks again for the PR! It looks very good.
Unfortunately there are now some conflicts, could you resolve them?
The CI failing is unrelated to the PR, see #1487
|
Hi FreyJo, I have resolved all the conflicts, would you like to check them? |
d698bad to
46d31f1
Compare
|
It seems there are still errors in the cython wrapper. Unfortunately, and there is also a new conflict. Sorry for the inconvenience. |
|
I should have fixed the bug and solved the conflict. Could you approve the workflow to check them again? |
Hi acados team,
I recently noticed that the exceptions in the acados Python template are too broad for the issues they represent, which makes it difficult to catch specific errors in higher-level code. Would you like me to replace general Exception usages with more specific exception types?
I’ve made a sample change in utils.py. It's also possible to define several new custom error types for acados, if needed. If you're okay with this direction, I can continue updating the exceptions in the other files as well.