PMDF Programmer's Reference Manual


Previous Contents Index


PMDFabortProgram

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

PASCAL

PMDF_abort_program (message, error_code)

argument information

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

C

PMDFabortProgram

(message, message_len, error_code)

argument information


void PMDFabortProgram(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

PMDFabortProgam 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 PMDFabortProgram , any active message enqueue or dequeue contexts should be aborted with PMDFabortMessage or PMDFdequeueMessagEnd . Note that this routine can be called even when PMDFinitialize has failed. On OpenVMS systems, the error message is written to PMDF_OUTPUT if defined and SYS$OUTPUT otherwise. On UNIX systems, the error message is written to stdout . Example output generated on an OpenVMS system in response to the call


PMDFabortProgram("Fatal error in BITBUCKET channel", 8922); 
is shown below:


04-MAY-2012  18:04:00: 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 Values

2


Previous Next Contents Index