XEdwin / jcouchdb

Automatically exported from code.google.com/p/jcouchdb
Other
0 stars 0 forks source link

Better exception messages #75

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
ServerImpl throws several CouchDBException exceptions. Unfortuantely the 
response is just added with the toString method. I'd prefer the 
resp.getContentAsString() or something even better within the exception message.

Maybe even the response could be added to the exception for later usage?

Original issue reported on code.google.com by cedarsoftgmbh@googlemail.com on 22 Jan 2011 at 1:51

GoogleCodeExporter commented 9 years ago
I think the reason for not doing this was that getContentAsString() is not 
side-effect free in that it might read from the input stream. The question is 
whether this really matters in the exception scenario.

Original comment by ff...@gmx.de on 22 Jan 2011 at 8:29

GoogleCodeExporter commented 9 years ago
I see your point. What about adding the response to the exception? Then I am 
free to call getContentAsString() myself, when catching the exception...

Original comment by cedarsoftgmbh@googlemail.com on 11 Apr 2011 at 2:51