Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.1k
Closed
Description
Bug report
Bug description:
When I tried to implement a subclass ofSyntaxError, the exception details ignored theend_offset-variable and just showed one caret at the position ofoffset.
raiseSyntaxError("Error message", (None,1,5,'a = sin(3)',1,9))
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<string>", line 1 a = sin(3) ^^^^SyntaxError: Error messageclassCustomSyntaxError(SyntaxError):passraiseCustomSyntaxError("Error message", (None,1,5,'a = sin(3)',1,9))
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<string>", line 1 a = sin(3) ^CustomSyntaxError: Error messageCPython versions tested on:
3.11, 3.12
Operating systems tested on:
Windows