AddError Method (ERROR)
10.1, PLBCMP GUI Only
The AddError method inserts a user error 'Lxx' as a trappable error or a 'lxx' as an untrappable error. The method uses the following format:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. An ERROR object that is accessed.
return
Optional. A Numeric Variable that returns the error stack position for the error being added. The stack position value is one relative.
code
Required. A Numeric Variable or decimal number with a value which is the basic error code value. This value can be from 0 to 99.
subcode
Optional. A Numeric variable or decimal number that is a 32 bit subcode value.
message
Optional. A Character String Variable or string literal that specifies the description for the user error.
flags
Optional. A Numeric Variable or decimal number that specifies a bit mask value that controls the behaviors of this method.
Flags Affected: EOS, OVER, ZERO
Note the following:
The ZERO flag is set if the {return} value is zero.
The OVER flag is set if the returned value overflows the {return} Numeric Variable.
The EOS flag is always cleared.
The {flags} bit mask values are described as follows:
|
Value |
Keyword |
A user error is added that is ... |
|
0x1 |
PLBERR_USER_EXCEPTION |
trappable. |
|
0x2 |
PLBERR_USER_NOEXCEPTION |
not trappable (default). |
See Also: Method Syntax, ERROR Methods
![]() |