GetSubMessage Method (ERROR)


10.1, PLBCMP GUI Only

 

The GetSubMessage method retrieves any additional messages that may exist for an ERROR object Sub-messages may exist to give more details about a given error. This method uses the following format:

 

 

[label]

{object}.GetSubMessage

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

 

 

 

[*FLAGS=]{flags}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. An ERROR object that has been previously declared.

return

Optional. A Character String Variable that receives the error sub-message string.

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

Optional. A Numeric Variable that specifies a bit mask value that controls the behaviors of this method.

Flags Affected: EOS, OVER, ZERO

Note the following:

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

  2. The ZERO flag is set to be FALSE.

  3. The OVER flag is set to indicate that there are no more sub messages and no the {return} data is NULL. TheOVER flag is set to FALSE when sub message data is returned.

  4. The EOS flag is set to TRUE if the {return} variable is too small to receive all of the method data without being truncated.

  5. The {flags} bit mask values are described as follows:

  6.  

    Value

    Keyword

    The method ...

    0x0

    PLBERR_ANOTHER_SUBMESSAGE

    retrieves the next available sub-message for the error being accessed.

    0x1

    PLBERR_FIRST_SUBMESSAGE

    resets and returns the first sub-message available for the error being accessed.

     

     

    See Also: Method Syntax, ERROR Methods

     



    PL/B Language Reference GetSubCode Method (ERROR) GetTime Method (ERROR)