| 24 | |
| 25 | If something goes wrong with the compilation or build, then one or more errors should be printed to the console. There are four categories of errors: |
| 26 | 1. Syntax errors |
| 27 | 2. Evaluation errors |
| 28 | 3. Validation errors |
| 29 | 4. System errors |
| 30 | The syntax errors include any errors that can be caught during the compilation of a single template. These include lexing, parsing, and syntax errors, but also semantic error like absolute assignment statements appearing in a structure template. Evaluation errors are the most common; these include any error that happens during the "execution" phase of processing like mathematical errors, primitive type conflicts, etc. Validation error occur during the "validation" phase and indicate that the generated machine profile violates the defined schema in some way. Lastly, there are system errors that include low-level problems like problems reading or writing to disk. |
| 31 | |
| 32 | In general, the errors try to indicate as precisely as possible the problem. Usually the name of the source file as well as the location inside the file (line and column numbers) are indicated. For most evaluation exceptions, a traceback is also provided. Validation errors are the most terse, giving only the element causing the problem and the location of the type definition that has been violated. |
| 33 | |
| 34 | There is one further class of errors called "compiler errors". These indicate an error in the logic of the compiler itself and should be accompanied by a detailed error message and a java traceback. All compiler errors should be reported as a [wiki:Doc/compiler/bugs bug]. The bug report should include the template that caused the problem along with the full java traceback. Hopefully, you will not encounter these errors. |