-
Notifications
You must be signed in to change notification settings - Fork 631
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python console: make traceback handling more robust
- Loading branch information
1 parent
c9ca87f
commit fe42aac
Showing
3 changed files
with
110 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
---input--- | ||
>>> exec('"') | ||
Traceback (most recent call last): | ||
File "<stdin>", line 1, in <module> | ||
File "<string>", line 1 | ||
" | ||
^ | ||
SyntaxError: EOL while scanning string literal | ||
|
||
>>> exec('"') | ||
Traceback (most recent call last): | ||
File "<stdin>", line 1, in <module> | ||
File "<string>", line 1, in <module> | ||
" | ||
^ | ||
SyntaxError: EOL while scanning string literal | ||
|
||
---tokens--- | ||
'>>> ' Generic.Prompt | ||
'exec' Name | ||
'(' Punctuation | ||
"'" Literal.String.Single | ||
'"' Literal.String.Single | ||
"'" Literal.String.Single | ||
')' Punctuation | ||
'\n' Text.Whitespace | ||
|
||
'Traceback (most recent call last):\n' Generic.Traceback | ||
|
||
' File ' Text | ||
'"<stdin>"' Name.Builtin | ||
', line ' Text | ||
'1' Literal.Number | ||
', in ' Text | ||
'<module>' Name | ||
'\n' Text.Whitespace | ||
|
||
' File ' Text | ||
'"<string>"' Name.Builtin | ||
', line ' Text | ||
'1' Literal.Number | ||
'\n' Text.Whitespace | ||
|
||
' ' Text.Whitespace | ||
'"' Literal.String.Double | ||
'\n' Text.Whitespace | ||
|
||
' ' Text.Whitespace | ||
'^' Punctuation.Marker | ||
'\n' Text.Whitespace | ||
|
||
'SyntaxError' Generic.Error | ||
': ' Text | ||
'EOL while scanning string literal' Name | ||
'\n' Text.Whitespace | ||
|
||
'\n' Generic.Output | ||
|
||
'>>> ' Generic.Prompt | ||
'exec' Name | ||
'(' Punctuation | ||
"'" Literal.String.Single | ||
'"' Literal.String.Single | ||
"'" Literal.String.Single | ||
')' Punctuation | ||
'\n' Text.Whitespace | ||
|
||
'Traceback (most recent call last):\n' Generic.Traceback | ||
|
||
' File ' Text | ||
'"<stdin>"' Name.Builtin | ||
', line ' Text | ||
'1' Literal.Number | ||
', in ' Text | ||
'<module>' Name | ||
'\n' Text.Whitespace | ||
|
||
' File ' Text | ||
'"<string>"' Name.Builtin | ||
', line ' Text | ||
'1' Literal.Number | ||
', in ' Text | ||
'<module>' Name | ||
'\n' Text.Whitespace | ||
|
||
' ' Text.Whitespace | ||
'"' Literal.String.Double | ||
'\n' Text.Whitespace | ||
|
||
' ' Text.Whitespace | ||
'^' Punctuation.Marker | ||
'\n' Text.Whitespace | ||
|
||
'SyntaxError' Generic.Error | ||
': ' Text | ||
'EOL while scanning string literal' Name | ||
'\n' Text.Whitespace |