diff options
author | Armin Rigo <arigo@tunes.org> | 2013-11-24 16:44:50 +0100 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2013-11-24 16:44:50 +0100 |
commit | 3f60ecf8ab2f4ee8a78459f87fb33b6d3d8c1ab3 (patch) | |
tree | cb7184e2f57ece978e879099fce7ccc16251b9f5 /lib_pypy/pyrepl | |
parent | A workaround against passing huge numbers or huge strings on 64-bit (diff) | |
download | pypy-3f60ecf8ab2f4ee8a78459f87fb33b6d3d8c1ab3.tar.gz pypy-3f60ecf8ab2f4ee8a78459f87fb33b6d3d8c1ab3.tar.bz2 pypy-3f60ecf8ab2f4ee8a78459f87fb33b6d3d8c1ab3.zip |
Catch MemoryErrors raised by the machinery of interactive command-line (like compiling the input), and
display it like we do KeyboardInterrupt.
Diffstat (limited to 'lib_pypy/pyrepl')
-rw-r--r-- | lib_pypy/pyrepl/simple_interact.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib_pypy/pyrepl/simple_interact.py b/lib_pypy/pyrepl/simple_interact.py index 6587a09922..faee76a3f0 100644 --- a/lib_pypy/pyrepl/simple_interact.py +++ b/lib_pypy/pyrepl/simple_interact.py @@ -63,3 +63,6 @@ def run_multiline_interactive_console(mainmodule=None): except KeyboardInterrupt: console.write("\nKeyboardInterrupt\n") console.resetbuffer() + except MemoryError: + console.write("\nMemoryError\n") + console.resetbuffer() |