-
Notifications
You must be signed in to change notification settings - Fork 255
Closed
Labels
gen-c#Related to the C# code generatorRelated to the C# code generator
Description
The pattern where the user code needs to correctly guess type of the ex.Value is fragile.
catch (WitException e)
{
var error = HeaderErrorToString((HeaderError)e.Value);
throw new HttpRequestException($"Header validation error: {error}");
}
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 ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
gen-c#Related to the C# code generatorRelated to the C# code generator
Type
Projects
Status
Done