HPERRMSG [ MPE/iX Intrinsics Reference Manual ] MPE/iX 5.0 Documentation
MPE/iX Intrinsics Reference Manual
HPERRMSG
NM callable only.
Obtains or displays error messages from the system catalog.
Syntax
_____________________________________________________
| |
| I32V I32V I16 I32V |
| HPERRMSG(displaycode,depth,errorproc,errornum,|
| CA I16 I32 |
| buffer,buflength,status); |
_____________________________________________________
Parameters
displaycode 32-bit signed integer by value (required)
Specifies the operation to be performed:
Value Meaning
1 Dump the error stack to $STDLIST and display any
errors that are detected by HPERRMSG (returned in
status).
2 Display to $STDLIST the error message corresponding to
the value in errornum and display any errors that are
detected by HPERRMSG (returned in status).
3 Obtain the error message corresponding to the value in
errornum and place it in the buffer specified by
buffer.
4 Display to $STDLIST the number of stack errors
specified in depth and display any errors detected by
HPERRMSG (returned in status).
5 Display to $STDLIST the error message corresponding to
errornum. Do not display any errors that are detected
by HPERRMSG (returned in status), but save information
in the status parameter.
6 Obtain the subsystem/error identification number
corresponding to the error number in errornum, and
place it in the buffer specified by buffer.
Table 4-19. (cont.)
Value Meaning
7 Get messages for the number of stack errors specified
in depth and place them in the buffer specified by
buffer. The contents of buffer contains the same
information as if the user had specified displaycode
4, including errors that are detected by HPERRMSG. All
messages are separated by carriage return/line feed
characters.
8 Dump the error stack to the buffer specified by
buffer. The result is the same as with displaycode 1,
except that the messages are placed in buffer,
separated by carriage return/line feed characters.
depth 32-bit signed integer by value (optional)
Specifies the number of error entries from the
stack that are to be displayed. A 1 (one) implies
the last error entry made.
Default = 0
errorproc 16-bit signed integer (reserved)
Do not specify this parameter, but maintain
parameter position.
Default = 0
errornum 32-bit signed integer by value (optional)
Passes a subsystem error identification number
whose corresponding message from the system catalog
is to be displayed or returned. An errornum is
interpreted as two 16-bit fields.
Bits (0:16) comprise status.info. A negative value
indicates an error condition, and a positive value
indicates a warning condition.
Bits (16:16) comprise status.subsys. The value
represented by these bits defines the subsystem
that set the status information.
If not specified, defaults to 0.
buffer character array (optional)
Specifies the buffer where text from the system
catalog error messages are to be placed.
If not specified, defaults to NIL.
buflength 16-bit signed integer by reference (optional)
Passes the length of the buffer input:
* As an input parameter, the length of the
buffer where the error messages are to be
placed. If the resulting messages are
longer than this length, they are truncated.
This procedure does not verify that the
buffer parameter has enough storage to hold
the number of bytes specified by buflength.
If there is not enough storage, the caller's
stack may be corrupted.
* As an output parameter, the actual length
(in bytes) of the messages that were
returned.
If buffer is specified, buflength must also be
specified.
If not specified, defaults to NIL.
status 32-bit signed integer by reference (optional)
Returns the status of the HPERRMSG call. If no
errors or warnings are encountered, status returns
32-bits of zero. If errors or warnings are
encountered, errornum is interpreted as two 16-bit
fields.
Bits (0:16) comprise status.info. A negative value
indicates an error condition, and a positive value
indicates a warning condition. Refer to the MPE/iX
Error Message Manual Volumes 1, 2 and 3
(32650-90066, 32650-90152, and 32650-90368) for a
description of its value.
Bits (16:16) comprise status.subsys. The value
represented by these bits defines the subsystem
that set the status information. The subsystem
identifier for HPERRMSG is 187.
If not specified, defaults to NIL.
CAUTION If an error or warning is encountered and the status parameter
was not specified, HPERRMSG causes the calling process to abort.
Operation Notes
Allows the user to obtain or display error messages from the system
catalog by supplying the corresponding error statuses. The caller can
supply a status whose corresponding message is to be displayed, or
specify that the messages corresponding to one or more errors in the
process error stack be displayed. The caller can optionally provide a
buffer and ask that the error messages be placed in that buffer rather
than be displayed to the user.
For errors that are displayed from the process error stack, any
parameters that were pushed with the errors are inserted into the
corresponding messages. Also, when dumping the entire stack, the user is
warned if any entries on the process stack were overwritten. (This
happens if more than 16 entries were pushed onto the stack.) If any
entries were overwritten, the oldest entries are the ones lost.
NOTE With the exception of HPERRMSG, HPERRREAD, and HPERRDEPTH, all
intrinsics that are called clear the process error stack.
If other intrinsics are called before or during the process of
reading the error stack, then the stack is cleared and the
information it contained is lost.
NOTE The internal software which moves error codes onto the error
stack is a proprietary part of the MPE/iX operating system.
Hewlett-Packard currently provides no user-callable procedure to
move error codes onto the error stack.
Related Information
Intrinsics HPERRDEPTH, HPERRREAD
Commands None
Manuals Getting System Information Programmer's Guide
(32650-90018) and MPE/iX Error Message Manual
Volumes 1, 2 and 3 (32650-90066, 32650-90152, and
32650-90368)
MPE/iX 5.0 Documentation