Siebel VB Language Reference > VB Language Reference >

Error Statement


This standard VB statement simulates the occurrence of a Siebel VB or user-defined error.

Syntax

Error errornumber

Argument
Description

errornumber

An integer between 1 and 32,767 representing an error code

Usage

If an errornumber is one that Siebel VB already uses, the Error statement simulates an occurrence of that error.

User-defined error codes should employ values greater than those used for standard Siebel VB error codes. To help make sure that non-Siebel VB error codes are chosen, user-defined codes should work down from 32,767.

CAUTION:  Error codes for the Siebel VB methods described in Siebel Object Interfaces Reference are between 4000 and 4999. Do not use codes in this range for user-defined error codes.

If an Error statement is executed, and there is no error-handling routine enabled, Siebel VB produces an error message and halts program execution. If an Error statement specifies an error code not used by Siebel VB, the message "User-defined error" is displayed.

Related Topics

Erl Function
Err Function
Err Statement
Error Function
Error Statement
On Error Statement
Resume Statement
Trappable Errors in Siebel VB

Siebel VB Language Reference Copyright © 2006, Oracle. All rights reserved.