ERC32 Ada Technical Summary: For mission-critical applications using the ERC32 spacecraft computer | ||
---|---|---|
Prev | Chapter 6. Cross-Compiler and Run-Time Interfacing | Next |
ERC32 Ada supports exception declarations, the raise statement, and exception handlers. It does not support exception propagation. We expect ERC32 Ada application programs to regard an exception as a fatal error, and to log the context of the failure (in non-volatile RAM for example), then to restart the program.
There is no overhead associated with calling or entering a subprogram in which an exception is declared, other than the space required to hold the exception descriptor. This a small record that contains the name of the exception (as a string), and several other items required to satisfy the needs of the predefined package Ada.Exceptions.
An exception may also be raised by a call of Ada.Exceptions.Raise_Exception. The advantage of making the call rather than using the raise statement is that the call may attach a message to the exception.
Unhandled exceptions, hardware faults and deadline errors are reported within the run-time system, and can be handled as interrupts. The default action is to log the fault (via application-dependent code), then do a warm restart.