In this third part of a three part series dealing with how you can handle errors gracefully whilst at the same time capturing as much information as possible, this article looks at Exception Handling.
Rather than displaying a system generated dialog or stopping with no UI at all, you can configure exception handling to always call a particular function by use of the WHENEVER ANY ERROR CALL function-name directive. When a trappable exception occurs, your function is then called, and in it you can display a nice UI to the user and perform some other background tasks before the program stops. This can include recording the fact that the program has ended with an exception.
if you want to ignore an exception and carry on then you can use the TRY/CATCH block. In the event of an exception inside the TRY block, the CATCH block will be executed and the program will then continue after the CATCH block.
Read more at
https://4js.com/ask-reuben/ig-16/