PMDF Programmer's Reference Manual
PMDF-PRM-6.0


Previous | Contents

PMDF_abort_program

Output an error message and then abort the currently running program.

VMS FORMAT

PMDF_abort_program (message, error_code)

argument information
Argument Data type Access Mechanism
message descriptor read reference
error_code signed longword read value

C FORMAT

PMDFabortProgram

(message, message_len, error_code)

argument information
void PMDFabortProgram (message, message_len, error_code) 
         char *message; 
         int   message_len; 
         int   error_code; 

ARGUMENTS

message

A text string to output as an error message. The length of this string should not exceed SHORTALFA_SIZE bytes. Any string exceeding this length will be truncated to SHORTALFA_SIZE bytes.

message_len

Length in bytes of message.

error_code

An integer error code to output as part of the error message. If error_code is 0, it will not be output.

DESCRIPTION

PMDF_abort_progam outputs as an error message the supplied text string messsage and, if non-zero, error_code. After the error message is output, a halt instruction is issued thereby aborting the currently running program. Generally, this routine should only be called when an unrecoverable error has been detected. Before calling PMDF_abort_program, any active message enqueue or dequeue contexts should be aborted with PMDF_abort_message or PMDF_dequeue_message_end. Note that this routine may be called even when PMDF_initialize has failed. On OpenVMS systems, the error message is written to PMDF_OUTPUT if defined and SYS$OUTPUT otherwise. On UNIX and NT systems, the error message is written to stdout. Example output generated on an OpenVMS system in response to the call
PMDF_abort_program ('Fatal error in BITBUCKET channel', 8922) 
is shown below:
15-SEP-92  15:20:10: Fatal error in BITBUCKET channel, status = 8922. 
%PAS-F-HALT, HALT procedure called 
%TRACE-F-TRACEBACK, symbolic stack dump follows 
module name     routine name                     line       rel PC    abs PC 
 
                                                           00094E6B  00094E6B 
MMMOD           MM_ABORT_PROGRAM_INT            13141      00000082  00036642 
PMDF_API        PMDF_ABORT_PROGRAM               5107      00000064  00009BF8 
BITBUCKET       ROUND_FILE                        214      00000031  00007051 
Return Values2


Previous | Next | Contents