In Service Studio you can create your own exceptions and have a different behavior for each exception. To create you own exceptions, simply use the Raise Error element in the action flow (Collection of elements that graphically implements the behavior of an action. You can have assign and control elements, exception handlers or you can invoke other actions. The elements are linked through Connectors.) where you want it.

User exceptions are more useful when the logic is complex and you want to handle the error differently: providing a different semantic for the error or handling the error elsewhere. For example, the exception is raised in a sub-action and you want to handle it in the action.

Creating a User Exception

How to create a User Exception:

To create a User Exception do one of the following:

  • Use the Raise Error tool in your action flow.

After adding a Raise Error element to your action flow, the Select Exception window Show picture is displayed with the list of existing User Exceptions. Create a new User Exception by clicking on the New User Exception button. Alternatively, if the user exception already exists simply select it in the window and click OK.

  • Use the eSpace Tree.

Right-click on the Exceptions folder, or, under the folder, on one of the following groups: All Exceptions or User Exception. Select Add User Exception option in the popup menu.

To set the name of the User Exception do the following:

  • In the eSpace tree, under the Logic layer, click on the User Exception to display its properties and set exception name in the Name property.

After creating your user exception, you can catch it, through the Error Handler, in any screen flow (Collection of objects that define the user interaction; you can have screens, entry points, external sites, etc, depending on the type of your flow. The objects are linked through Connectors.) or action flow (Collection of elements that graphically implements the behavior of an action. You can have assign and control elements, exception handlers or you can invoke other actions. The elements are linked through Connectors.).

Handling a User Exception

How to handle a user exception:

Simply set the Exception property of the Error Handler from one of the drop list or from the Select Exception window Show picture. Learn more about Handling Exceptions

The "User exceptions" exception is more general that any of the other user exceptions. For example, say your eSpace has the following user exceptions: "InvalidCityName" and "InvalidCustomer". If the InvalidCityName exception is raised, and you do not have a specific Error Handler to handle it, this exception is handled by an Error Handler associated with a User exception, if any exist.

Deleting a User Exception

How to delete an User Exception:

In the eSpace tree, under the Logic layer, right-click on the user exception and select the Delete option in the popup menu, or, after selecting the user exception, press the Del key. All the error handlers that handled that exception now have no exception associated with them and you have to either update them with another exception or delete them.

If you only delete the Raise Error of that exception, the exception still appears in the drop-down list of the exceptions supported by your eSpace.

See Also

User Exception Properties | Raise Error Properties | Handle Exceptions | Exception Flow