1 (Bus error)				A memory reference was 
invalid. This is the most common type of system error. An application 
might have tried to access memory in another application's partition 
or in a portion of memory not accessible to the application. 
Typically, this error occurs if your application uses a handle or 
pointer reference that is no longer valid or was never valid. For 
example, if your application does not initialize a variable of type 
Handle or Ptr to the correct value and then tries to use that value 
as a memory reference, a bus error could occur. Or if you have made 
an error in performing pointer arithmetic, a bus error could occur. 
This error could also occur if your application attempts to access a 
block of memory that has been moved or disposed of. Once your 
application disposes of a block of memory, either directly or 
indirectly, all pointer and handle references to that block of memory 
are invalid and could cause bus errors. If your application 
dereferences a handle, calls a routine that could move or purge 
memory, and then relies on the master pointer value, a bus error 
could occur. See Inside Macintosh: Memory for more information. If 
your application is careless in using the Memory Manager's BlockMove 
procedure or another technique to copy bytes directly, data 
structures used by the Memory Manager could be altered and a bus 
error generated.


2 (Address error)				A reference to a word 
(2 bytes) or long word (4 bytes) was not on a word boundary. An 
address error is often simply a bus error in which the memory 
reference happens to be odd. Thus, any programming errors that could 
cause a bus error might result in an address error as well. Indeed, 
sometimes the same programming error can generate both types of 
errors if you execute the offending code several times. Address 
errors are often microprocessor-specific. That is, code that executes 
correctly on MC68030 microprocessors might generate an address error 
on MC68000 microprocessors. This is most likely to be a problem for 
assembly-language programmers.


3 (Illegal instruction)			The microprocessor attempted 
to execute an instruction not defined for that version of the 
microprocessor. This might occur if you set a compiler to generate 
MC68030 code and then attempt to execute that code on a MC68000 
microprocessor. Attempting to execute PowerPC code on a MC680x0 
microprocessor could also cause this problem. Typically, this problem 
occurs only if you are programming in assembly language or if your 
compiler generates illegal instructions. If your application (either 
intentionally or unintentionally) modifies its own code while 
executing, then this problem could also occur.


4 (Zero divide)				The microprocessor received a 
signed divide (DIVS) or unsigned divide (DIVU) instruction, but the 
divisor was 0. When you write code that performs the division 
operation, you should ensure that the divisor can never be 0, unless 
you are using Operating System or SANE numeric types that support 
division by 0.


5 (Check exception)			The microprocessor executed a 
check-register-against-bounds (CHK) instruction and detected an 
out-of-bounds value. If you are programming in a high-level language, 
this might occur if you have enabled range-checking and a value is 
out of range (for example, you attempt to access the sixth element of 
a five-element array).


6 (TrapV exception)			The microprocessor executed a 
trap-on-overflow (TRAPV) instruction and detected an overflow. If you 
are programming in a high-level language, this might occur if you 
have enabled integer-arithmetic overflow checking and an overflow 
occurs.


7 (Privilege violation)			The Macintosh computer was in 
a mode that did not allow execution of the specified microprocessor 
instruction. This should not happen because the Macintosh computer 
always runs in supervisor mode. However, if you are programming in 
assembly language, this error could occur if you execute an erroneous 
return-from-execution (RTE) instruction.


8 (Trace exception)			The trace bit in the status 
register is set. Debuggers use this error to force code execution to 
stop at a certain point. If you are programming in a high-level 
language, this system error should always be intercepted by your 
low-level debugger.


9 (A-line exception)			The trap dispatcher failed to 
execute the specified system software routine. This error might occur 
if you attempt to execute a Toolbox routine that is not defined in 
the version of the system software that is running.


10 (F-line exception)			Your application executed an 
illegal instruction.


11 (Miscellaneous exception)			The microprocessor 
invoked an exception not covered by system error IDs 1 to 10. This 
exception might be generated in the case of a hardware failure.


12 (Unimplemented core routine)		The Operating System 
encountered an unimplemented trap number.


13 (Spurious interrupt)			The interrupt vector table 
entry for a particular level of interrupt is NIL. This error usually 
occurs with level 4, 5, 6, or 7 interrupts. Typically, this error 
should affect only developers of low-level device drivers, NuBus 
cards, and other expansion devices.


14 (I/O system error)			A Device Manager or Operating 
System queue operation failed. This might occur if the File Manager 
attempts to remove an entry from an I/O request queue, but the queue 
entry has an invalid queue type (perhaps the queue entry is 
unlocked). Or this might occur as a result of a call to Fetch or 
Stash, but the dCtlQHead field was NIL. This error can also occur if 
your driver has purged a needed device control entry (DCE).


15 (Segment loader error)			A call was made to 
load a code segment, but a call to GetResource to read the segment 
into memory failed. This could occur if your application attempts to 
load a segment that does not exist, or if your application attempts 
to load a segment but there is not enough memory for it in the 
application heap. When an attempt to load a code resource with 
resource ID 0 fails, a system error with ID 26 is generated instead.


16 (Floating-point error)			The halt bit in the 
floating-point environment word was set.


17-24 (Can't load package)			The Package Manager 
attempted to load a package into memory, but the call to GetResource 
failed. This could occur because the system file is corrupted, or 
because there is not enough memory for the package to be loaded. For 
example, if you call a List Manager routine when memory is very low, 
the SysError procedure could be executed.


25 (Out of memory)			The requested memory block 
could not be allocated in the heap because there is insufficient free 
space. Typically, a Toolbox routine generates this system error if it 
requires heap space to run but there is insufficient space. Your 
application should prevent this from occurring by ensuring that it 
always leaves enough memory for Toolbox operations. See Inside 
Macintosh: Memory for more details.You can also get this error if the 
Package Manager was unable to load the Apple Event Manager (Pack 8). 
See the chapter "Package Manager" in this book for an explanation of 
this error.


26 (Segment loader error)			A call was made to 
load a code segment with resource ID 0, but the call to GetResource 
failed. This usually occurs if your application attempts to execute a 
nonexecutable file. You can also get this error if the Package 
Manager was unable to load the Program-to-Program Communications 
(PPC) Toolbox package (Pack 9). See the chapter "Package Manager" in 
this book for an explanation of this error.


27 (File map destroyed)			The File Manager encountered 
a paradox. A logical block number was found that is greater than the 
number of the last logical block on the volume or less than the 
logical block number of the first allocation block on the volume. The 
disk is probably corrupted.


28 (Stack overflow error)			The Operating System 
detected that the application's stack collided with its heap. This 
could happen when a deeply nested routine is executed or when 
interrupt routines use more stack space than available. If your 
application relies on recursion, it should monitor the size of the 
stack to prevent such an error from occurring. If this error occurs 
simply because your application attempted to execute a deeply nested 
routine, you can prevent this from occurring by increasing the 
minimum size of the stack at application startup. Because the size of 
the stack may differ from one Macintosh model to another, an 
application might encounter no problems on a Macintosh LC but crash 
on a Macintosh Plus, for example. For more information, see Inside 
Macintosh: Memory. You can also get this error if the Package Manager 
was unable to load the Edition Manager (Pack 11). See the chapter 
"Package Manager" in this book for an explanation of this error.


30 (Disk insertion required)			A necessary disk is 
not available. The System Error Handler responds to this error by 
requesting that the user insert the requested disk. Often, the user 
can cancel this alert box by pressing Command-period repeatedly; in 
certain circumstances, however, pressing Command-period repeatedly 
can lead to a system crash. You can also get this error if the 
Package Manager was unable to load the Data Access Manager (Pack 13). 
See the chapter "Package Manager" in this book for an explanation of 
this error.


31 (Wrong disk inserted)			The user inserted the 
incorrect disk in response to a disk-insertion request. The System 
Error Handler ejects the disk and allows the user to insert another. 
You can also get this error if the Package Manager was unable to load 
the Help Manager (Pack 14). See the chapter "Package Manager" in this 
book for an explanation of this error.


33 (Negative zcbFree value)			The Memory Manager's 
calculation of the number of bytes free in a heap zone (that is, the 
value of the zcbFree field) resulted in a negative number. Your 
application might have used up too much memory in the heap zone, or 
the heap is corrupted


41 (Finder not found)			The Operating System could 
not locate the Finder on the disk. The disk might be corrupted.


84 (Menu purged)				The Menu Manager 
attempted to access information about a menu, but the menu record was 
purged. You should ensure that all menus stored in your application's 
resource file are marked as unpurgeable.


100 (Can't mount system startup volume)	The Operating System could 
not mount the system startup volume and thus is unable to read the 
system resource file into memory. The startup volume could be 
corrupted or broken. Your application can force startup on another 
volume by clearing parameter RAM, as discussed in the chapter 
"Parameter RAM Utilities" in this book.


32767 (Default system error)		This is the default system 
error that executes when an undefined problem occurs. Your 
application can call the SysError procedure with this value.