## Error Reporting

Many programs (including the shell) use OS-9's standard error reporting function, which displays an error number on the error output path. The standard error codes are listed in the Appendix A, OS-9 Error Codes of this manual. If desired, the printerr command can be executed, which replaces the smaller, built-in error display routine with a larger (and slower) routine that looks up descriptive error messages from a text file called `/d0/sys/errmsg`. Once the printerr command has been run it cannot be turned off. Also, its effect is system-wide.

Programs called by the shell can return an error code in the CPU's “B” register (otherwise B should be cleared) upon termination. This type of error, as well as errors detected by the shell itself, will cause an error message to be displayed and processing of the command line or procedure file to be terminated unless the “-x” built-in command has been previously executed.