MPE XL Software System Traps [ Trap Handling Programmer's Guide ] MPE/iX 5.0 Documentation
Trap Handling Programmer's Guide
Chapter 6 MPE XL Software System Traps
A software system trap is a software-detected error that occurs while
system code (typically a system intrinsic) is executing. These traps
result in the calling process being aborted. You can intercept system
traps by supplying and arming a system trap handling routine. This trap
handler can obtain information about the error and prevent the process
from being aborted.
Some intrinsics are designed to abort the calling process when certain
errors are detected. Typical errors are:
* Illegal access. You attempt to access an intrinsic for which you do
not have access capability.
* Illegal parameters. You pass intrinsic parameters that are not
defined for your environment.
* Illegal environment. You did not pass a required intrinsic
parameter.
* Resource violation. The resource you requested is either illegal or
outside the constraints imposed by MPE XL.
The XSYSTRAP intrinsic arms (or subsequently disarms) the user-written
system trap handling procedure.
When a program begins execution, the user-written system trap handler is
disarmed automatically. If armed by the XSYSTRAP intrinsic, and
subsequently activated by an error, the user-written system trap handler
executes.
A discussion of the XSYSTRAP intrinsic follows.
MPE/iX 5.0 Documentation