docs.intersystems.com
InterSystems IRIS Data Platform 2019.2  /  Business Process and Data Transformation Language Reference

Business Process and Data Transformation Language Reference
<faulthandlers>
Previous section           Next section
InterSystems: The power behind what matters   
Search:  


Provide zero or more <catch> and one <catchall> element to catch faults and system errors.
Synopsis
<scope>   <throw fault='"MyFault"'/>         ...   <faulthandlers>     <catch fault='"MyFault"'>           ...     </catch>     <catch fault='"OtherFault"'>           ...     </catch>     <catchall>           ...     </catchall>   </faulthandlers> </scope>
Details
Attribute or Element Description
name, disabled, xpos, ypos, xend, yend attribute See Common Attributes and Elements.”
<catch> element There may be zero or more <catch> elements inside <faulthandlers>. Each catches a specific, named fault produced by a <throw> element.
<catchall> element Catch a fault or system error that does not match any <catch>. If there are no <catch> elements in <faulthandlers>, there must be a <catchall>. Otherwise, <catchall> is optional.
Description
To enable error handling, BPL defines an element called <scope>. A scope is a wrapper for a set of activities. This scope may contain one or more activities, one or more fault handlers, and zero or more compensation handlers. The <faulthandlers> element is intended to catch any errors that activities within the <scope> produce. The <catch> and <catchall> elements within <faulthandlers> may provide <compensate> statements that invoke <compensationhandler> elements to compensate for those errors.
When a <scope> provides no <faulthandlers> block, InterSystems IRIS automatically outputs the system error to the Event Log. When a <scope> does contain a <faulthandlers> block, the BPL business process must output <trace> messages to the Event Log for system error messages to appear there. System error messages appear on the Terminal console, in either case.
For details, see “BPL Error Handling Conventions” in Developing BPL Processes.
Note:
It is not possible to reverse the order of <compensationhandlers> and <faulthandlers>. If both blocks are provided, <compensationhandlers> must appear first and <faulthandlers> second.
See Also
<catch>, <catchall>, <compensate>, <compensationhandlers>, <scope>, and <throw>.


Previous section           Next section
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-08-23 06:48:00