Siebel VB Language Reference > VB Language Overview >

Trapping Errors Generated by Siebel VB Methods

Many Siebel VB methods return error codes, but they must be handled differently from those returned by the standard VB functions and statements. Siebel VB methods use numeric error codes in the range from 4000 to 4999. For errors generated by Siebel VB methods, use a construct of this form to see the text of the error message:

   If ErrCode <> 0 Then
      ErrText = GetLastErrText
      TheApplication.RaiseErrorText ErrText
      Exit Sub
   End If

For more information, read Siebel Object Interfaces Reference.

Note that DisplayError: is a label and is the target of a Goto statement elsewhere in the program.

NOTE:  The GetLastErrText method is available only through interfaces external to Siebel Tools. Therefore, you can use it in Microsoft VB, but not in Siebel VB.

Siebel VB Language Reference