We have a problem getting the original exception out of the ResourceException.
If there is an exception thrown in the @Get method, we do something like this:
@get method
{
catch(Throwable t)
{
throw new ResourceException(t);
}
}
Through a variety of different efforts, this one the final one to this point,
we override doCatch(Throwable)
And it looks like:
doCatch
{
this.getResponse().setStatus(new Status(Status.SERVER_ERROR_INTERNAL, t));
}
On the client side, we catch throwable which is indeed a ResourceException.
However, getCause() is null. The client stack trace looks like this in the end
- with no traces of the original exception even though we know it is passed
into the doCatch method.
Internal Server Error (500) - Internal Server Error
at org.restlet.resource.ClientResource.doError(ClientResource.java:459)
at
org.restlet.resource.ClientResource$1.invoke(ClientResource.java:1667)
at $Proxy9.storeItem(Unknown Source)
........
I have searched pretty extensively for a solution or some examples on how to
solve this. Am I missing something?
Thanks!
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2720933