Raising your own exceptions
All exceptions in IBM Robotic Process Automation are of the type Runtime Exception
, but their error message varies. You can use your own messages while raising exceptions to gracefully stop your bot's runtime.
Gracefully failing is controlling the exception event to prevent further damage. In the context of a bot's runtime, this can imply deleting affected files, closing connections, closing windows, gathering exception data for logging, warning the right people, and other tasks before shutting down the bot.
In IBM Robotic Process Automation, you can raise Runtime Exceptions
with custom error messages with the Throw Exception (failTest
) command. The Throw Exception (failTest
) is useful when you want to trigger exception handling subroutines with your a custom error message giving specific conditions. You can create error messages with as many details as possible.