1

Closed

Review the exception types thrown by the OData formatter consistent

description

Probably doesn't meet the RTM bar.

Youssef:

About the InvalidOperation vs SerializationException, there are ~20 invalid operations thrown in the formatter namespace (more than the serialization exceptions). For consistency, we should either change them all to invalid operation or change them all to serialization exceptions.

David:

IMO, the case when IOE is correct is if it’s a matter of the object’s current state preventing the operation (rather than a parameter being invalid, in which case SE is better). I think there are some cases where the formatter requires state (like the request); in those cases, I think IOE makes sense. In all other cases, I’d go with SE.
Closed Jan 18, 2013 at 9:18 PM by hongyes
Verified

comments

HongmeiG wrote Jan 2, 2013 at 5:27 PM

let us use SerializationException if possible.

davidmatson wrote Jan 2, 2013 at 10:13 PM

commit 7fe226565e57f9306b2b7d5553b80dbd97d475a3