<< Prev        Next >>

ID : 440

Err.Raise

Function

To generate an error.

Syntax

Err.Raise error code

Guaranteed Entry

Error code
Specify an error code as integer type data in a hexadecimal form.

Description

  • Causes an error specified in programming. Error codes that can be specified are those defined in the system. Refer to the error code table.
  • The seventh digit of an error code in a hexadecimal form represents the level. The level is changeable.
    Example
    Err. Raise &H81600007 [The argument is incorrect. Level 1]
    Err. Raise &H82600007 [The argument is incorrect. Level 2]
  • Uses Err.Number and Err.Description to read generated error values.

Attention

  • If an undefined error code is specified, "Undefined error" occurs.
  • If the value of the specified error code is 0 or more (0 to &H7FFFFFFF) or if the value of the specified error level is 6 or more,
    the error "&H83500127 Value is out of range" occurs.
  • If any error code caused by an compile error is specified (&H8*601001 to &H8*605FFF), an error "&H83500127 Value is out of range" will occurs.

Example

Dim aaa As Integer
Comm. Open 1
aaa = Comm. Count(1)
If aaa < 3 Then
	Err.Eaise &h83600008 'Causes the error [Not enough arguments] at Level 3.
End If

ID : 440

<< Prev        Next >>