Returning Run-Time Errors in Siebel VB

This topic describes how to return run-time errors in Siebel VB.

To return run-time errors in Siebel VB

  • Return a run-time error code with one of the following items:

    • Predefined Siebel VB properties. You can use some combination of Err, ErrText, and Error.

    • Custom Siebel VB method. If you access a Siebel object interface through Component Object Model (COM) or ActiveX, then use the following code to view the text of the error message:

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

The GetLastErrText method is only available if you use an interface that is external to Siebel Tools. You can use it in Microsoft VB but not in Siebel VB.

Object interface methods use numeric error codes in a range of 4000 to 4999.

For more information about error-handling and error codes, see Siebel VB Language Reference.