betfair / cougar

Cougar is a framework for making building network exposed service interfaces easy.
http://betfair.github.io/cougar
Apache License 2.0
27 stars 18 forks source link

Tidy up error codes / exceptions around (un)marshalling #65

Closed eswdd closed 10 years ago

eswdd commented 10 years ago

Currently we have a plethora of ServerFaultCodes around marshalling/unmarshalling which generally don't feel correct (in terms of server/client blame) when they are generated in the client.

Additionally marshalling/unmarshalling throws CougarServiceExceptions, also not appropriate in the client.

It feels like we should consolidate the fault codes to remove knowledge of the mime type failing so we have a client & server unmarshall fault code and client & server marshal code. Also we should have CougarMarshallingException and perhaps the EnumDeserialisationException should stem from this.

@richardqd what do you reckon? Feels odd to clean up client exceptions (as i am for #10) and not sort this out at the same time.