Opened 5 years ago

#5667 enhancement new

Document how IArgument.fromStringProto should signal failures

Reported by: Jean-Paul Calderone Owned by:
Priority: normal Milestone:
Component: core Keywords: amp
Cc: Branch:


If an argument value cannot be converted to a structured object (for example, the string "hello" being received for an Integer argument), fromStringProto must presumably fail. It would be nice if the way in which it is supposed to fail were documented (it's possible this is just "raise any exception", which seems to be the current reality).

Additionally, it would be nice if argument decoding errors weren't necessarily fatal. If an IArgument implementation can somehow signal it is safe to do so, then it might be preferable to let the connection survive and send back an error indicating the argument could not be parsed. Care should be taken here: it may still be necessary to parse all argument values, even if a random argument in the middle raises an exception). Since signaling this fallback is possible might have interface implications, it might make sense to do this at the same time (as updating IArgument documentation) or first.

Change History (0)

Note: See TracTickets for help on using tickets.