Siebel VB Language Reference > VB Language Overview > Trapping Errors Returned by Siebel VB >

Option 2: Trap Errors Using an Error Handler


The On Error statement used here specifies a label to jump to in case of errors. The code segment is part of the main procedure and uses the Err statement to determine which error code is returned. To make sure your code does not accidentally fall through to the error handler, precede it with an Exit statement.

Siebel VB Language Reference