GetSubCode Method (ERROR)


10.1, PLBCMP GUI Only

 

The GetSubCode method retrieves the subcode associated with an error being accessed on the error stack. This method uses the following format:

 

 

[label]

{object}.GetSubCode

[GIVING {return}] USING [*POS=]{position}

 

Where:

label

Optional. A Program Execution Label.

object

Required. An ERROR object that has been previously declared.

return

Optional. A Numeric Variable that returns the maximum number of errors allowed on the error stack.

position

Optional. A Numeric Variable or decimal number whose value is a one relative position in the current error stack for the error being accessed.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. This message returned is the same as provided by the S$ERROR$ program variable.

  2.  

    Example:

    I03 00000056*2 WINERR:0x2

     

  3. If {position} not specified, the method uses the most recent error position.

  4. The ZERO flag is set if the returned value is zero.

  5. The OVER flag is set if the returned value overflows the {return} Numeric Variable.

  6. The EOS flag is always set to FALSE.

  7. The subcode error values an error are the same as described in the 'PL/B Runtime Reference' manual under the 'I/O Error Subcodes' section.

 

 

See Also: Method Syntax, ERROR Methods

 



PL/B Language Reference GetProgram Method (ERROR) GetSubMessage Method (ERROR)