代码大全

(singke) #1
PDL

PDL

PDL

PDL

Procedure RecordErrorMessage
(
ErrorCode ErrorCode_t;
var status:Status_t
)


{ This routine outputs an error message based on an error code
Supplied by the calling routine The way it outputs the message
depends on the current processing state which it retrieves
on its own It returns a variable indicating success or failure }
begin
{ Set the default status }
Status:=Failure;


{ look up the message based on the error code}
LookupErrorMessage(ErrorCode,ErrorMessage); ErrorMessage


{ if the error code is valid }
{ determine the processing method }
{ if doing interactive processing }
{ Print the error message interactively and declare success }
{ else doing batch processing }
{ if the batch message file opens properly }
{ log the error message to the batch file,
close the file and declare success }
{ else the message code is not valid }
{ notify the user that an internal error has been detected
end; { RecordErrorMessage() }


ErrorMessage


procedure RecordErrorMessage
(

Free download pdf