-
Notifications
You must be signed in to change notification settings - Fork 0
Either instead of typed Exception #22
Copy link
Copy link
Open
Description
Parser currently returns typed exceptions, RequiredException,OptionalException, ParseException.
RequiredException and OptionalException both have an ivar, target which when read cause warnings because it's type is Object and callers are forced to cast to what they desire, the casting causes the warning.
target is an Object because it's assigned to what is intended to be returned, which is defined via generic methods.
A Exception cannot be parameterized with generics, which is why it's a `Object'
Change the response from Parser to be an Either so under an exceptional state, target can have the appropriate type so the caller does not observer any warnings when reading target.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels