Siebel VB Language Reference > Siebel VB Language Overview > Trapping Errors Returned by Siebel Visual Basic (VB) >

Option 1: Trap Errors Within Body of Code


The On Error statement identifies the line of code to go to in case of an error. In this case, the Resume Next argument means that execution continues with the next line of code after the error. In this example shown in Figure 2, the line of code to handle errors is the If statement. It uses the Err statement to determine which error code is returned.

Figure 2. Example Code for Error Handling
Click for full size image
Siebel VB Language Reference Copyright © 2006, Oracle. All rights reserved.