Domain-specific error messages
The textX system raises Python errors that are helpful for DSL developers but will not always be clear to DSL users. Therefore, a module must be provided that builds upon Python exceptions and warnings and produces messages that are easily understandable only with domain-specific knowledge. Typical candidates are: TextXSyntaxError
, TextXSemanticError
, ExpressionTypeError
, TypeMismatchError
etc.
Additionally, standard outputs should be also made domain specific. Additionally, all this can be organized using a logger and different log levels, such as error, warning, info, and debug.
As start these errors can be processed:
- incomplete input data due to non-resolved references
- race conditions
Because references are resolved by the parser (otherwise TextXSemanticError
). Race conditions are also not possible because again if a reference cannot be set to a non-unique object (also TextXSemanticError
). These errors must be caught and processed in the model instantiation call.