mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Issue #14200: Idle shell crash on printing non-BMP unicode character.
UnicodeEncodeError is raised for strings contains non-BMP characters. For eval results unicode escaping is used, print() calls display exception with traceback as usual.
This commit is contained in:
parent
c5ceb0aaaf
commit
05bab93339
4 changed files with 40 additions and 0 deletions
|
@ -196,8 +196,12 @@ class SocketIO(object):
|
|||
return ("ERROR", "Unsupported message type: %s" % how)
|
||||
except SystemExit:
|
||||
raise
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
except socket.error:
|
||||
raise
|
||||
except Exception as ex:
|
||||
return ("CALLEXC", ex)
|
||||
except:
|
||||
msg = "*** Internal Error: rpc.py:SocketIO.localcall()\n\n"\
|
||||
" Object: %s \n Method: %s \n Args: %s\n"
|
||||
|
@ -257,6 +261,9 @@ class SocketIO(object):
|
|||
if how == "ERROR":
|
||||
self.debug("decoderesponse: Internal ERROR:", what)
|
||||
raise RuntimeError(what)
|
||||
if how == "CALLEXC":
|
||||
self.debug("decoderesponse: Call Exception:", what)
|
||||
raise what
|
||||
raise SystemError(how, what)
|
||||
|
||||
def decode_interrupthook(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue