Description
When trying to handle an exception and write the output to the writer, if the cause and the message of an exception are null a NullPointerException is thrown (ErrorPageWriter,379).
Checking if the ex.getMessage() is not null will fix this problem.