Syntax errors¶
Module name: blackbird.error
This module contains the class BlackbirdErrorListener
, which
inherits the standard ANTLR4 error listener, and overrides the default
syntaxError
method.
This custom listener enables us to:
Remove the extraneous Python traceback, which we generally do not want users to see.
Replace some common ANTLR error messages, which can be a bit obfuscating, with ones that are more informative.
Note that we do not try and replace all error messages, just the more common ones that the user is likely to come across.
Summary¶
|
A generic exception with no traceback provided |
|
Blackbird syntax error exception |
Custom error listener for Blackbird |