Using the Restlet API, can an application handle an Exception that 
propagates out of the Jakarta Commons HTTP client software?  It doesn't 
propagate out of the Restlet API, and I haven't found a way to get it from 
the Restlet objects.  I hope you can tell me where to look.

An exception is often more useful than a Status.  The exception has a stack 
trace and perhaps a chain of causes (nested exceptions), which often clarify 
what happened.

There was a previous discussion of this:
http://article.gmane.org/gmane.comp.java.restlet/2217
I would suggest a different approach; that is to contain the Exception 
somewhere within the Response, perhaps as an attribute.  For example, an 
application might choose to propagate the exception thus:

throw (Exception) 
response.getAttributes().get("org.restlet.status.exception"); 


Reply via email to