(C) 1998 AROS - The Amiga Research OS


NAME
#include <proto/dos.h>

BOOL Fault (code , header , buffer , len)

LOCATION
In DOSBase at offset 78

SYNOPSIS
LONG code
STRPTR header
STRPTR buffer
LONG len

FUNCTION
Fault will obtain the error message string for the given error code. First the header string is copied to the buffer, followed by a ":" (colon), then the NULL terminated string for the error message into the buffer.

By convention, error messages are ALWAYS less than 80 (plus 1 for NULL termination), and ideally less than 60 characters.

If the error code is not know, then the string "Unknown error" followed by the error number will be added to the string.

INPUTS
code
The error code.
header
The string to prepend to the buffer before the error text. This may be NULL in which case nothing is prepended.
buffer
The destination buffer.
len
Length of the buffer.

RESULT
Number of characters placed in the buffer, may be 0.

EXAMPLE

SEE ALSO

NOTES

BUGS

INTERNALS

HISTORY