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
Different classes of embedding api errors have indistinguishable handles #4379
Comments
Added Accepted label. |
We should try to get the API clean before M1. Added this to the M1 milestone. |
Removed Priority-Medium label. |
Removed this from the M5 milestone. |
@turnidge Is this still a concern? We have not had too many complaints about this from embedders, correct? |
Well, nobody has ever complained about this. I'm going to close it and if we get an actual request for this feature then we can open it again. |
Currently there is no way to distinguish what caused a dart api function to return an error handle. If we had some way to do this, it would help.
Consider adding an enum of different error types...
type error
range error
null argument
not found
etc.
It seems like we will want the ability to distinguish these cases. It could also let us drop functions like Dart_IntegerFitsIntoInt64. Another use case would be distinguishing class not found from type error for Dart_GetClass. Developers who wish to handle an error must check for it eagerly to make the error signal unambiguous. That's a bit painful.
As part of this change we would need to list all possible errors for each api function in the docs.
The text was updated successfully, but these errors were encountered: