xfail scan-tree-dump-not throw in g++.dg/pr99966.C on hppa*64*-*-*
[official-gcc.git] / gcc / m2 / gm2-libs-iso / EXCEPTIONS.def
blobd037b7e6877bc1c46fbddbfce122696976583fe8
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.
5 Copyright ISO/IEC (International Organization for Standardization
6 and International Electrotechnical Commission) 1996-2021.
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). *)
12 DEFINITION MODULE EXCEPTIONS;
14 (* Provides facilities for raising user exceptions
15 and for making enquiries concerning the current execution state.
18 TYPE
19 ExceptionSource; (* values of this type are used within library
20 modules to identify the source of raised
21 exceptions *)
22 ExceptionNumber = CARDINAL;
24 PROCEDURE AllocateSource(VAR newSource: ExceptionSource);
25 (* Allocates a unique value of type ExceptionSource *)
27 PROCEDURE RAISE (source: ExceptionSource;
28 number: ExceptionNumber; message: ARRAY OF CHAR)
29 <* noreturn *> ;
30 (* Associates the given values of source, number and message with
31 the current context and raises an exception.
34 PROCEDURE CurrentNumber (source: ExceptionSource): ExceptionNumber;
35 (* If the current coroutine is in the exceptional execution state
36 because of the raising of an exception from source, returns
37 the corresponding number, and otherwise raises an exception.
40 PROCEDURE GetMessage (VAR text: ARRAY OF CHAR);
41 (* If the current coroutine is in the exceptional execution state,
42 returns the possibly truncated string associated with the
43 current context. Otherwise, in normal execution state,
44 returns the empty string.
47 PROCEDURE IsCurrentSource (source: ExceptionSource): BOOLEAN;
48 (* If the current coroutine is in the exceptional execution state
49 because of the raising of an exception from source, returns
50 TRUE, and otherwise returns FALSE.
53 PROCEDURE IsExceptionalExecution (): BOOLEAN;
54 (* If the current coroutine is in the exceptional execution state
55 because of the raising of an exception, returns TRUE, and
56 otherwise returns FALSE.
59 END EXCEPTIONS.