This project is read-only.


Review the exception types thrown by the OData formatter consistent


Probably doesn't meet the RTM bar.


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.


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 10:18 PM by hongyes


HongmeiG wrote Jan 2, 2013 at 6:27 PM

let us use SerializationException if possible.

davidmatson wrote Jan 2, 2013 at 11:13 PM

commit 7fe226565e57f9306b2b7d5553b80dbd97d475a3