Unit 'amigados' Package
[Overview][Constants][Types][Procedures and functions][Index] [#amunits]

Fault

Returns the text associated with a DOS error code

Declaration

Source position: amigados.pas line 1634

function Fault(

  code: LongInt;

  header: pCHAR;

  buffer: pCHAR;

  len: LongInt

):LongBool;

function Fault(

  code: LongInt;

  header: string;

  buffer: pCHAR;

  len: LongInt

):Boolean;

Arguments

code

  

Error code

header

  

Header to output before error text

buffer

  

Buffer to receive error message

len

  

Length of buffer

Function result

Number of characters put into buffer (may be 0)

Arguments

code

  

Error code

header

  

Header to output before error text

buffer

  

Buffer to receive error message

len

  

Length of buffer

Description

This routine obtains the error message text for the given error code. The header is prepended to the text of the error message, followed by a colon. Puts a null-terminated string for the error message into the buffer. By convention, error messages should be no longer than 80 characters (+1 for termination), and preferably no more than 60. The value returned by IoErr() is set to the code passed in. If there is no message for the error code, the message will be "Error code number".

The number of characters put into the buffer is returned, which will be 0 if the code passed in was 0.

See also

IoErr

  

Return extra information from the system

SetIoErr

  

Sets the value returned by IoErr()

PrintFault

  

Returns the text associated with a DOS error code


Documentation generated on: 2021-07-30