634 @param exctype the type of the exception |
634 @param exctype the type of the exception |
635 @param excval data about the exception |
635 @param excval data about the exception |
636 @param exctb traceback for the exception |
636 @param exctb traceback for the exception |
637 @param unhandled flag indicating an uncaught exception |
637 @param unhandled flag indicating an uncaught exception |
638 """ |
638 """ |
|
639 |
|
640 if exctype in [GeneratorExit, StopIteration]: |
|
641 # ignore these |
|
642 return |
|
643 |
639 if exctype in [SystemExit, bdb.BdbQuit]: |
644 if exctype in [SystemExit, bdb.BdbQuit]: |
640 atexit._run_exitfuncs() |
645 atexit._run_exitfuncs() |
641 if excval is None: |
646 if excval is None: |
642 excval = 0 |
647 excval = 0 |
643 elif isinstance(excval, (unicode, str)): |
648 elif isinstance(excval, (unicode, str)): |