Siebel VB Language Reference > Methods Reference for Siebel VB > Error Handling Methods >

Simulate Error Method


The Simulate Error method simulates the occurrence of an error. Note the following:

  • If an Error statement runs, and if code to handle the error does not exist, then Siebel VB creates an error message and stops code from running.
  • If an Error statement specifies an error code that Siebel VB does not use, then it displays the following error message:

    User-defined error

Format

Error errornumber

The following table describes the arguments that you can use with this method.

Argument
Description

errornumber

An integer in the range of 1 through 32,767 that identifies an error code. If Siebel VB already uses an error number that the errornumber argument identifies, then the Error statement simulates an occurrence of that error.

Using a Custom Error Code

A custom error code must use a value that is greater than any value that Siebel VB uses for a predefined error code. To avoid using a predefined error code, it is recommended that the value you use for a custom error code start with 32,767. For subsequent custom error codes, you can work down from 32,767.

CAUTION:  Do not use any error code in the range of 4000 through 4999. These are predefined codes for Siebel VB methods. For more information, see Siebel Object Interfaces Reference.

Siebel VB Language Reference Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.