Uploaded image for project: 'Commons Jelly'
  1. Commons Jelly
  2. JELLY-206

cannot nest catch tags

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.0-RC2
    • None
    • core / taglib.core
    • None
    • jelly:junit test

    Description

      The outer tag does not receive the 'rethrown' exception. How come?

      <?xml version="1.0"?>
      <test:suite
      xmlns:j="jelly:core"
      xmlns:test="jelly:junit"
      xmlns:define="jelly:define"
      xmlns:log="jelly:log">

      <test:case name="nested exceptions" xmlns:my="mytaglib">

      <define:taglib uri="mytaglib">

      <define:tag name="mytag">
      <j:scope>
      <j:catch var="ex">
      <define:invokeBody/>
      </j:catch>

      <log:info>mytag ${name} after catch block exception: ${ex}</log:info>

      <j:if test="${ex != null}">
      <log:debug>exception was caught !!!</log:debug>
      <test:fail>rethrowing the exception</test:fail>
      <log:debug>CANNOT REACH THIS POINT !!!</log:debug>
      </j:if>
      </j:scope>
      </define:tag>

      </define:taglib>

      <my:mytag name="outer">
      <my:mytag name="inner">
      <test:fail>boom</test:fail>
      </my:mytag>
      </my:mytag>

      </test:case>

      </test:suite>

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fcorneli Frank Cornelis
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: