I have a custom StatusService class, and the overridden
getRepresentation(Status, Request, Response) method is never getting invoked
when exceptions are thrown. I tried overriding
getStatus(Throwable,Request,Response) temporarily as a test, and it is called
and receives a valid Throwable. I'm using the GAE M6 build.
Here is my sample code:
in my Application class:
@Override
public synchronized Restlet createInboundRoot() {
this.setStatusService(new MyStatusService());
// ...
}
My custom StatusService:
public class MyStatusService extends StatusService {
public MyStatusService() {
super(true);
}
@Override
public Representation getRepresentation(Status status, Request request,
Response response)
{
// If an error occurred, try to return the error page.
Otherwise, return
// null so that Restlet to delegate the response
handling to Restlet's default.
if (status.isError()) {
// handle the error
}
return null;
}
}
Any ideas what I may be missing here?
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2435834