pippo icon indicating copy to clipboard operation
pippo copied to clipboard

ErrorHandler only handles Exceptions not Errors or other Throwables

Open lambdaupb opened this issue 6 years ago • 2 comments
trafficstars

The ErrorHandler interface is only designed for Exception and its subclasses, but the hierarchy is rooted at Throwable. Especially some 500 errors are of type Error.

I had an instance where I was confronted with the default Jetty error page, showing the whole stacktrace because Pippos dispatch only catches Exception and not Throwable.

There might be some research of reasonable behaviour needed, but as Jetty is handling Error types, pippo should probably as well.

lambdaupb avatar Mar 28 '19 21:03 lambdaupb

@lambdaupb I think that I understand what you say. Can you please add a concrete example from your application (a code snippet or something similar) to visualize the problem? Thanks!

decebals avatar Mar 29 '19 09:03 decebals

You can just throw an Error inside a controller method.

throw new NoClassDefFoundError("test");

lambdaupb avatar Mar 29 '19 10:03 lambdaupb