-
Notifications
You must be signed in to change notification settings - Fork 197
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
C#: improve WitException.Value type #1042
Comments
Alternatively, I would like to suggest not using exceptions for WIT results and instead directly returning the |
That's how it used to work prior to #968. I think both approaches have merit, and I'd suggest providing an option to allow the user to choose at binding generation time, with some reasonable default if not otherwise specified. |
this isn't done yet since part of this was to allow choice of using results directly at binding generation time. |
The pattern where the user code needs to correctly guess type of the
ex.Value
is fragile.The cast here could throw invalid cast exception or could give misleading information.
Should we generate
WitHeaderException
and make the conversion on behalf of the user ?cc @jsturtevant @dicej
The text was updated successfully, but these errors were encountered: