mirror of
https://github.com/python/cpython.git
synced 2025-09-25 09:50:37 +00:00
gh-131878: Handle top level exceptions in new pyrepl and prevent of closing it (#131910)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
parent
1bc16504ef
commit
99a0d7e5b3
2 changed files with 6 additions and 0 deletions
|
@ -162,3 +162,8 @@ def run_multiline_interactive_console(
|
||||||
except MemoryError:
|
except MemoryError:
|
||||||
console.write("\nMemoryError\n")
|
console.write("\nMemoryError\n")
|
||||||
console.resetbuffer()
|
console.resetbuffer()
|
||||||
|
except SystemExit:
|
||||||
|
raise
|
||||||
|
except:
|
||||||
|
console.showtraceback()
|
||||||
|
console.resetbuffer()
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Handle uncaught exceptions in the main input loop for the new REPL.
|
Loading…
Add table
Add a link
Reference in a new issue