commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc DeXeT (JIRA)" <commons-...@jakarta.apache.org>
Subject [jira] Créée: (JELLY-165) CatchTag closest from java tryCatch block (with expected exceptions list)
Date Fri, 19 Nov 2004 09:51:24 GMT
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


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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message