|
|
|
|
|
14. ERRORS
14.1 Compile time errors
The compile time errors are not fatal (the program can execute) except for the error 1 (Out of heap space) which terminates the compilation process and no execution occurs.
1: Fatal Error: Out of heap space
2: File "%s" not found
3: Include file "%s" not found
4: "END OF FILE" encountered
5: Illegal character in text "%s"
6: Unclosed comment
7: Illegal pragma "%s"
8: Illegal action "%s"
9: Illegal system declaration "%s"
10: Integer "%s" too big
11: Negative exponent in integer literal
12: Digit expected found "%s"
13: Integer "%dE%s" too big
14: Integer base "%ld" not between 2 and 36
15: Extended digit expected found "%s"
16: Illegal digit "%c" in based integer "%d#%s"
17: Based integer "%d#%s" too big
18: "'" expected found "%s"
19: Character literal exceeds source line
20: Use \" instead of "" to represent " in a string
21: Use / instead of \\ as path delimiter
22: Illegal string escape "\%s"
23: Numerical escape sequences should end with "\" not "%s");
24: String continuations should end with "\" not "%s");
25: String literal exceeds source line
26: Name expected found "%s"
27: Integer literal expected found "%s"
28: String literal expected found "%s"
29: Identifier expected found "%s"
30: Expression expected found "%s"
31: Expression expected after "begin"
32: Declaration expected found "%s"
33: Initialisation of "%s" failed
34: "%s" declared twice
35: "%s" not declared
36: Associativity expected found "%s"
37: Statement priority "%s" too big
38: Syntax with two parameters before operator is illegal
39: Empty syntax declaration
40: "%s" redeclared with infix priority %d not %d
41: "%s" redeclared with prefix priority %d not %d
42: Priority %d required for parameter after "%s" not %d
43: Priority <= %d expected found "%s" with priority %d
44: Priority <= %d expected found "%s" with priority %d
45: "%s" must have priority %d not %d for dot expression
46: "%s" expected found "%s"
47: "%s" expected found "%s"
48: Undefined type for literal "%s"
49: "newtype", "subtype", "func", "enumlit" or "action" expected found "%s"
50: "func" or "type" expected found "%s"
51: Match for %s failed
52: Variable expected in %s found %s
53: Type expected found %s
54: Procedure expected found %s expression
55: Parameter specifier expected found "%s"
56: Evaluate type expression %s failed
Undefined error
14.2 Exceptions
There are various exceptions which can be raised during program execution:
To catch an EXCEPTION the following handler construct can be used:
block
number := 1 div 0;
exception
catch NUMERIC_ERROR:
number := 1;
end block;
14.4 Stack trace
When an EXCEPTION is not catched at any level the program is terminated and the hi interpreter generates a stack trace. For example:
*** Uncaught EXCEPTION NUMERIC_ERROR raised with
{integer <80b2e64>:
14.5 Other errors and warnings
|
|