jsonyx.TruncatedSyntaxError¶
- exception jsonyx.TruncatedSyntaxError(msg, filename, doc, start=0, end=0)¶
Bases:
SyntaxErrorSyntax error trucated to fit within the terminal width.
Added in version 2.0.
- Parameters:
- Example:
>>> import jsonyx as json >>> raise json.TruncatedSyntaxError("msg", "<string>", "c" * 998, 0, 998) Traceback (most recent call last): File "<string>", line 1, column 1-999 ccccccccccccccccccccccccccccccccccc...cccccccccccccccccccccccccccccccccc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ jsonyx.TruncatedSyntaxError: msg
Tip
Set the
COLUMNSenvironment variable to overwrite the width.See also
jsonyx.format_syntax_error()for formatting the exception.