Cernunnos Manual


<throw>

Description:

Throws the provided exception

Reagents:

Name XPath Description Reagent Type Expected Type Required
EXCEPTION @exception The exception to throw. Will use the attribute named Attributes.EXCEPTION by default. PHRASE java.lang.Throwable No

Examples:

Re-throws a handled exception:

 
       
        <handle-error> 
          <try> 
            <groovy> 
              <script>throw new RuntimeException('Not good.');</script> 
            </groovy> 
          </try>  
          <catch class="${groovy(IllegalArgumentException.class)}"> 
            <echo-ln>I caught an IllegalArgumentException...</echo-ln> 
          </catch>  
          <catch> 
            <echo-ln>I caught something else...</echo-ln>  
            <throw/> 
          </catch> 
        </handle-error>