Service Studio allows you to manage errors or exceptional conditions that can occur in your eSpace, through the use of exceptions. An exception, by definition, causes an interruption in the execution of the flow, and is logged under the Error log in Service Center.
Types of Exceptions
There are two kinds of exceptions:
Exceptions automatically raised by the platform due to system errors. One example is an error returned by the database due to a constraint violation;
Exceptions explicitly raised by the developer on specific business conditions. These are also known as User Exceptions.
Learn more about the different exception types.
The exceptions raised in your eSpace are handled in a screen flow or action flow by the Error Handler.
When an exception is raised, the current execution flow is aborted. The flow restarts in the Error Handler element that handles that exception. An exception can be raised at any point of your eSpace. If, in the current flow, there is no Error Handler that handles that exception, the exception is transferred to the caller flow. If there is no Error Handler at all, your application aborts and the end-user gets a generic error.
This is why you should have, at least, one Error Handler in your eSpace flow that provides a message to the end-user, and allows to continue navigating.
Learn more on How to Handle Exceptions.
In your business logic you can raise exceptions to notify that an exceptional condition has occurred. As an example, in your application a user is trying to perform an action that requires authentication. If the user is not authentication, it makes sense to raise an exception, wherever you detect this, and on the screen flow catch the exception and redirect the user to the log-in screen.
To raise an exception, simply use the Raise Error tool in your action flows.
Handle Exceptions | Explicitly Raise an Exception | Types of Exceptions