| 1 |
(* Library module defined by the International Standard |
| 2 |
Information technology - programming languages |
| 3 |
BS ISO/IEC 10514-1:1996E Part 1: Modula-2, Base Language. |
| 4 |
|
| 5 |
Copyright ISO/IEC (International Organization for Standardization |
| 6 |
and International Electrotechnical Commission) 1996-2021. |
| 7 |
|
| 8 |
It may be freely copied for the purpose of implementation (see page |
| 9 |
707 of the Information technology - Programming languages Part 1: |
| 10 |
Modula-2, Base Language. BS ISO/IEC 10514-1:1996). *) |
| 11 |
|
| 12 |
DEFINITION MODULE M2EXCEPTION; |
| 13 |
|
| 14 |
(* Provides facilities for identifying language exceptions *) |
| 15 |
|
| 16 |
TYPE |
| 17 |
M2Exceptions = |
| 18 |
(indexException, rangeException, caseSelectException, invalidLocation, |
| 19 |
functionException, wholeValueException, wholeDivException, realValueException, |
| 20 |
realDivException, complexValueException, complexDivException, protException, |
| 21 |
sysException, coException, exException |
| 22 |
); |
| 23 |
|
| 24 |
PROCEDURE M2Exception (): M2Exceptions; |
| 25 |
(* If the current coroutine is in the exceptional execution state because of the raising |
| 26 |
of a language exception, returns the corresponding enumeration value, and otherwise |
| 27 |
raises an exception. |
| 28 |
*) |
| 29 |
|
| 30 |
PROCEDURE IsM2Exception (): BOOLEAN; |
| 31 |
(* If the current coroutine is in the exceptional execution state because of the raising |
| 32 |
of a language exception, returns TRUE, and otherwise returns FALSE. |
| 33 |
*) |
| 34 |
|
| 35 |
END M2EXCEPTION. |