-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
raise python errors instead of c++ abort #533 #523
Labels
feature request
Suggest an idea on this project
Comments
Also helps
|
TODO: @archibate you gonna work on this tonight! |
archibate
changed the title
raise python errors instead of c++ abort
raise python errors instead of c++ abort #533
Feb 25, 2020
TODO(archibate or yuanming-hu): |
Seems already solved by @yuanming-hu. Closing now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to throw python exception instead of getting c++ abort for some of taichi errors (eg. imread-file-not-found, new-var-after-materialization) so that people could catch them in python and deal with it.
Describe the solution you'd like
So, throw
std::exception
inTI_ERROR
, instead ofstd::raise
. Doing this, you'll got aRuntimeError
in python-scope.Additional comments
See https://pybind11.readthedocs.io/en/stable/advanced/exceptions.html for more details.
The text was updated successfully, but these errors were encountered: