| Author |
Wrath of incompatible throws clause in SimpleTagSupport.doTag()
|
Jacob Fenwick
Ranch Hand
Joined: Apr 28, 2006
Posts: 55
|
|
I've been pressing for increased use of tags, beans, and EL, but I keep running into a problem. There is much weeping and gnashing of teeth whenever someone needs to throw an exception as you need to wrap everything in JspException. This sort of ruins our whole exception framework, as previously we would throw exceptions up the hierarchy to the JSP, and we could see what kind of errors it was at the top, but since JspException wraps everything now we have to dig down to find the real exception. Is there a way around this?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56179
|
|
JspException is a wrapper exception in which you record the actual exception as the root cause. For example, in order to have your cake and eat it too within a method that only allows throwing a JspException: By supplying the root exception as the 2nd paramter to the JspException constructor, it is propogated and reported as the root cause. ServletException is another example of a wrapper exception.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: Wrath of incompatible throws clause in SimpleTagSupport.doTag()
|
|
|