Error Handler Builder
In this topic ...
Related Topics ...
Use the Error Handler builder to catch errors and exceptions that occur in a model. We can specify error handling specified on any action, such as a page, a method or an action list. We can also set a general error handler to catch any un-handled error.
How do I...
Catch and handle an error in a model?
Catch all un-handled errors when a model is loaded?
Display my own error page for un-handled errors?
Handle an error in Java code?
Write a Java error to the log?
Specifying Inputs
The Error Handler builder takes the inputs described in the table below. For help on inputs common to many or all builders such as those in the Properties and HTML Attributes input groups, see "Using the Builder Call Editor."
Input name Description Name Enter a name for this builder call. The designer tool displays this name in the builder call list. Exceptions Select an error catching mode. We can choose:
- Catch exceptions thrown by a specific action - Select this radio button to catch an exception related to a specific model action. You must then specify the action in the Try Action input below.
- Catch all unhandled exceptions - Select this radio button to catch all un-handled exception in a model. Any exception that is not explicitly handled by another Error Handler Builder will be caught and handled.
Try Action This input is available when you catch an exception thrown by a specific action. Specify the action in which you want to have your error handler method called during an exception. The error handling can be specified on any action, such as a page, method or action list.
Catch Action Enter an action you want called as a result of the exception. This action can be any action, such as a Page, Method, or Action List item. Exception Class To focus the error handler on a particular type of exception, enter the fully-qualified class name here. For example, if you wanted this error handler to process File Not Found exceptions, you would enter: java.io.FileNotFoundException. If any other exception occurs, the default error handler will process it.