Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

MPW Command Reference


MakeErrorFile

Tool

SYNTAX

MakeErrorFile [errorFile1] [errorFile2]… [-l] [-o fileName | dirName]
[-p]

DESCRIPTION

The MakeErrorFile tool takes your specially formatted error message files and creates an error file that is accessible to MPW tools. These error message files contain both error numbers and their associated text messages. For example, the SysErrs.err file that comes with MPW provides standard error messages corresponding to system error numbers.

Error message files created with MakeErrorFile can be accessed by MPW tools that retrieve error messages, such as the GetErrorText command. These tools use the ErrMgr unit in the ToolLibs.o library to access various error messages via their error number.

INPUT

Standard input, unless you specify one or more error message files as input. In this case each file specified in the errorFile parameter is processed separately, and an output error file is created for each.

OUTPUT

One or more error files, corresponding to either standard input or the input files. If you use standard input, MakeErrorFile writes the output to the Out.Err file. If you specify input files in the errorFile parameter, the command writes each input file to an output file of the same name, with the suffix .Err (errorFile.Err). The output files are created as MPW 'TEXT' files.

STATUS

MakeErrorFile can return the following status codes:

0

no errors

1

syntax error

2

error in processing

PARAMETERS

errorFile1 [errorFile2]…

Specifies one or more specially formatted error message files as input.

Note
You can create your own files by beginning each line with an error number (in the range of 2-byte signed integers), followed by a space, followed finally by the corresponding error message text on the same line. Lines beginning with the '#' character are treated as comments. •

OPTIONS

-l

Writes an ordered list of error numbers and messages to standard output.

-o fileName | dirName

Places a single error file in the fileName file or multiple error files in the dirName directory. If fileName is a full pathname and you are using only one error message file as input, MakeErrorFile places the output in the specified file. If a directory name is specified and you are using one or more error message files as input, MakeErrorFile places the output files in the specified directory. In this case the files are named according to the form errorFile.Err.

-p

Writes progress information to diagnostic output.

EXAMPLES

The command below creates a new error message file called myErrors.Err using the error numbers and messages contained in myErrors:

MakeErrorFile myErrors

The following command line writes an ordered list of system error numbers and messages to the file SysErrsList:

MakeErrorFile SysErrs -l >SysErrsList

 
 


Last Updated July 2000