[ http://nagoya.apache.org/jira/browse/JELLY-165?page=history ]
Marc DeXeT updated JELLY-165:
-----------------------------
Attachment: patchCatchTag2.txt
Improvement : Get real exception wrapped in JellyTagException even if exception
is not catched.
> CatchTag closest from java tryCatch block (with expected exceptions list)
> -------------------------------------------------------------------------
>
> Key: JELLY-165
> URL: http://nagoya.apache.org/jira/browse/JELLY-165
> Project: jelly
> Type: Improvement
> Components: core / taglib.core
> Versions: 1.0-beta-5
> Environment: JDK1.4_02 Windows XP Redhat AS 2.1
> Reporter: Marc DeXeT
> Attachments: CatchTag.java, catchTagTest.zip, catchTagTest.zip,
> patchCatchTag.txt, patchCatchTag2.txt
>
> The actual CatchTag doesn't distinct kind of exception.
> <catch var="e">
> <doTag/>
> </cacth>
> <if test="${! empty(e)}">
> <process/>
> </if>
> try {
> doTag();
> } catch (Throwable t) {
> process ();
> }
> It above all doesn't allow tryCatch nesting.
> Improvements are following
> 1) LIST :
> This Tag implements expected exception list. If an unexpected exception is
> thrown, tag throws it upper.
> So it's possible to get
> try {
> try {
> try {
> process();
> } catch( exceptionA lower} {
> doLower();
> }
> } catch( exceptionB middle ) {
> doMidlle();
> }
> } catch( exceptionC upper) {
> doUpper();
> }
> 2) Get REAL exception
> As improvement, it implements too dissect exception stack to get the first
> not Jelly exception and put to context this one.
> 3) Respect exception class parenthood. A assignable exception will be catched
> if her ancestor is in excpetion list.
> See unit test for more details.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]