A list of common Swift exception types.
Bad Memory Access.
The process attempted to access invalid memory, or it attempted to access memory in a manner not allowed by the memory's protection level (e.g. writing to read-only memory).
Abnormal Exit.
The process exited abnormally. The most common causes of crashes with this exception type are uncaught Objective-C/C++ exceptions and calls to abort().
Trace Trap.
Similar to an Abnormal Exit, this exception is intended to give an attached debugger the chance to interrupt the process at a specific point in its execution.
Swift code will terminate with this exception type if an unexpected condition is encountered at runtime such as:
- a non-optional type with a nil value;
- a failed forced type conversion.
Illegal Instruction.
The process attempted to execute an illegal or undefined instruction. The process may have attempted to jump to an invalid address via a misconfigured function pointer.
Quit.
The process was terminated at the request of another process with privileges to manage its lifetime. SIGQUIT does not mean that the process crashed, but it did likely misbehave in a detectable manner.
Killed.
The process was terminated at the request of the system.
Guarded Resource Violation.
The process violated a guarded resource protection. System libraries may mark certain file descriptors as guarded, after which normal operations on those descriptors will trigger an EXC_GUARD
exception.
Resource Limit.
The process exceeded a resource consumption limit. This is a notification from the OS that the process is using too many resources.