assistance-engine/docs/developer.avapframework.com/chapter9_40.md

781 B

The try Statement

The try statement in AVAP specifies exception handlers and/or cleanup code for a block of statements. The syntax is as follows:

try()
                code to execute 
                exception()
                code to execute
                end()

The try block contains code that might raise an exception. The exception block contains code to handle exceptions raised by the try block. If an exception occurs, control is transferred to the except block. If no exception occurs, the except block is skipped.

Additional information about exceptions can be found in the section Exceptions , and information about using the raise statement to throw exceptions can be found in the section The raise Statement .