Welcome Guest! Log in
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…

Sometimes, it can be necessary to force a process to stop with an error status.

For example when implementing error handling or raising an error depending on a functional check.

Using a Rhino scripting action

The syntax for raising an exception with Rhino is simply:

throw "Error message";

Consider the following example.

88 designer

Scripting expression:

__ctx__.publishVariable('/USER_ERROR_MSG', 'Something went wrong in this process');
throw "Error message";

In this example, we also published a variable named "USER_ERROR_MSG" at the root level of the session.

In this way, analysts will be able to find quick information on the error by consulting this variable, for example in Analytics:

88 analytics



Suggest a new Article!