DebugClients/Python3/DebugBase.py

branch
5_1_x
changeset 1476
7d7710aeeab9
parent 936
f6bc16bd4198
child 1510
e75ecf2bd9dd
equal deleted inserted replaced
1473:c3bdd5ebafbc 1476:7d7710aeeab9
585 @param unhandled flag indicating an uncaught exception 585 @param unhandled flag indicating an uncaught exception
586 """ 586 """
587 exctype, excval, exctb = excinfo 587 exctype, excval, exctb = excinfo
588 if exctype in [SystemExit, bdb.BdbQuit]: 588 if exctype in [SystemExit, bdb.BdbQuit]:
589 atexit._run_exitfuncs() 589 atexit._run_exitfuncs()
590 if excval is None:
591 excval = 0
592 elif isinstance(excval, str):
593 self._dbgClient.write(excval)
594 excval = 1
595 elif isinstance(excval, bytes):
596 self._dbgClient.write(excval.decode())
597 excval = 1
590 if isinstance(excval, int): 598 if isinstance(excval, int):
591 self._dbgClient.progTerminated(excval) 599 self._dbgClient.progTerminated(excval)
592 else: 600 else:
593 self._dbgClient.progTerminated(excval.code) 601 self._dbgClient.progTerminated(excval.code)
594 return 602 return

eric ide

mercurial