MashZone NextGen 10.2 | Appendix | Legacy Presto components | Mashables and Mashups | Mashups in EMML | Writing Mashups in EMML | Handling or Throwing Exceptions | <try>
 
<try>
 
<catch>
Examples
This block statement follows the well-known try-catch control pattern to process children statements and catch and handle any exceptions thrown by those statements. You must specify at least one <catch> statement.
You can use most EMML statements within <try> or <catch>. Some of the most common are statements, such as <invoke>, <directinvoke>, <sql>, <script> or <xslt> that retrieve data or use other programming languages.
You can also use <throw> within <try> or <catch> to throw exceptions, and possibly stop further mashup or macro processing. Or use <return> to forcibly stop further mashup or macro processing and return the current value of <output>.
For examples, see:
*A Basic <try>/<catch> Block
*Throwing Custom Exceptions in <catch>
*Forcibly Stopping Processing in <catch>
*Exception Propagation
*Exception Matching for <catch> Blocks
*<directinvoke> Exceptions
*<invoke> Exceptions
*<script> Exceptions
*Specific Java Exceptions for <sql>, <xslt>, XPath or Syntax Exceptions
*Default EMML Exception Class
.
Can Contain
( ( Statements Group | Variables Group | Declarations Group | Macroincludes Group | presto:beginTransaction | presto:commitTransaction | presto:rollbackTransaction | macro:custom-macro-name | ( any element in a non-EMML namespace ) )+ followed by (<catch>)+ )
Allowed In
mashup | catch | else | elseif | for | foreach | if | macro | operation | sequence | try | while

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release