Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353232 - Jetty is unwrapping ServletException and putting the cause in "javax.servlet.error.exception"
Summary: Jetty is unwrapping ServletException and putting the cause in "javax.servlet....
Status: RESOLVED WONTFIX
Alias: None
Product: Jetty
Classification: RT
Component: server (show other bugs)
Version: 7.3.0   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 7.5.x   Edit
Assignee: Greg Wilkins CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-27 12:57 EDT by Rafael Cepeda CLA
Modified: 2011-08-29 00:30 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Cepeda CLA 2011-07-27 12:57:14 EDT
Jetty is unwrapping ServletException and putting the cause in "javax.servlet.error.exception". So ErrorHandlers cannot correctly identify the original error in this case. For example, throwing (new ServletException(new RuntimeException())) will end up to be identified as an unchecked exception (RuntimeException) instead of a checked one (ServletException). This behavior could affect an ErrorHandler that logs differently depending on the type of exception it gets.
Comment 1 Greg Wilkins CLA 2011-08-29 00:30:35 EDT
Rafael,

a ServletException is not an "Original error", it is just a carrier of the cause exception - which is the original error.   

Jetty has been unwrapping ServletException since the beginning, and no complaints before - so I believe that we have the right action and would be very cautious about changing.

But if you really think that there is a good case to expose the ServletException to the error handling, then please reopen this and explain your reasoning in more detail.

cheers