Hi,
I'm finishing to upgrade to Play 2.4 and I moved out the error handling from the Global thing. However, it seems that when the onServerError is called, the full stack is not printed anymore into the log file. I tried to retrieve the exception stack, but I can't get it all, only the last exception. I tested with and without binding my own error handler and the stack is actually printed with full details if I do not register my own error handler.
My code as defined before (only the method name changed), is
public Promise<Result> onServerError(RequestHeader request, Throwable t) {
return Promise.<Result> pure(internalServerError(
error.render(t, play.data.Form.form(Login.class))
));
}
I added some code to print the current trace, but even if I try to access the cause, it's said as being null:
StringWriter sw = new StringWriter();
exception.printStackTrace(new PrintWriter(sw));
logger.debug(sw.toString());
Any advice ?
Thanks a lot,
Fabian