Siebel VB Language Reference > Siebel VB Language Overview >

Trapping User-Defined, Non-Siebel VB Errors


The code examples shown in Figure 3 and Figure 4 show two ways to set and trap user-defined errors. Both options use the Error statement to set the user-defined error to the value 30000. To trap the error, option 1 (Figure 3) places error-handling code directly before the line of code that could cause an error. Option 2 (Figure 4) contains a labeled section of code that handles any user-defined errors.

Figure 3. Error Handling, Option 1
Click for full size image
Figure 4. Error Handling, Option 2
Click for full size image
Siebel VB Language Reference Copyright © 2006, Oracle. All rights reserved.