4 ms·
Ada has a set of High Integrity Restrictions that define pragmas that turn off exceptions: "No_Exceptions - Raise_statements and exception_handlers are not all
by thesuperbigfrog 5y ago
Ada has a set of High Integrity Restrictions that define pragmas that turn off exceptions:
"No_Exceptions - Raise_statements and exception_handlers are not allowed. No language-defined run-time checks are generated; however, a run-time check performed automatically by the hardware is permitted."
Source: http://www.ada-auth.org/standards/12rm/html/RM-H-4.html http://www.ada-auth.org/standards/12rm/html/RM-H-4.html
If the underlying operating system or board support system have similar support then panic situations would be avoided entirely.
While this is a highly-specialized case, it is defined and supported by high integrity Ada implementations / runtimes.
- bb88 5y agoYou don't want to do that. It's an optimization, not a "The compiler will guarantee there won't be exceptions thrown." https://www.adaic.org/resources/add_content/docs/95style/html/sec_5/5-9-5.html https://www.adaic.org/resources/add_content/docs/95style/htm... "If you disable exception checks and program execution results in a condition in which an exception would otherwise occur, the program execution is erroneous. The results are unpredictable"