Throwing a User-defined Error
some cases it is useful to be able to throw your own exceptions in an implementation, e.g. when some prerequisites of the implementation are not matched, or you want to replace exceptions that have been thrown in other modules of your implementation by own ones. You can throw a user-defined errors from an activity diagram using the Throw Exception.
The example below shows a simple use case of this.
The first decision checks whether the needed data is provided to perform the activity. If no listOfIdocs is coming in, an exception is thrown and the activity is aborted.
As input pins, the throw exception needs type, description and code of the error to be thrown. These three values are user-defined. You can set them as you need.
Related Pages: