581 @param exctb traceback for the exception |
581 @param exctb traceback for the exception |
582 @param unhandled flag indicating an uncaught exception |
582 @param unhandled flag indicating an uncaught exception |
583 """ |
583 """ |
584 if exctype in [SystemExit, bdb.BdbQuit]: |
584 if exctype in [SystemExit, bdb.BdbQuit]: |
585 atexit._run_exitfuncs() |
585 atexit._run_exitfuncs() |
|
586 if excval is None: |
|
587 excval = 0 |
|
588 elif isinstance(excval, (unicode, str)): |
|
589 self._dbgClient.write(excval) |
|
590 excval = 1 |
586 if isinstance(excval, int): |
591 if isinstance(excval, int): |
587 self._dbgClient.progTerminated(excval) |
592 self._dbgClient.progTerminated(excval) |
588 else: |
593 else: |
589 self._dbgClient.progTerminated(excval.code) |
594 self._dbgClient.progTerminated(excval.code) |
590 return |
595 return |