Invoke user function and return trace function for exception event. If the debugger stops on this exception, invoke self.user_exception(). Raise BdbQuit if self.quitting is set. Return self.trace_dispatch to continue tracing in this scope.
(self, frame, arg)
| 381 | return self.trace_dispatch |
| 382 | |
| 383 | def dispatch_exception(self, frame, arg): |
| 384 | """Invoke user function and return trace function for exception event. |
| 385 | |
| 386 | If the debugger stops on this exception, invoke |
| 387 | self.user_exception(). Raise BdbQuit if self.quitting is set. |
| 388 | Return self.trace_dispatch to continue tracing in this scope. |
| 389 | """ |
| 390 | if self.stop_here(frame): |
| 391 | # When stepping with next/until/return in a generator frame, skip |
| 392 | # the internal StopIteration exception (with no traceback) |
| 393 | # triggered by a subiterator run with the 'yield from' statement. |
| 394 | if not (frame.f_code.co_flags & GENERATOR_AND_COROUTINE_FLAGS |
| 395 | and arg[0] is StopIteration and arg[2] is None): |
| 396 | self.user_exception(frame, arg) |
| 397 | self.restart_events() |
| 398 | if self.quitting: raise BdbQuit |
| 399 | # Stop at the StopIteration or GeneratorExit exception when the user |
| 400 | # has set stopframe in a generator by issuing a return command, or a |
| 401 | # next/until command at the last statement in the generator before the |
| 402 | # exception. |
| 403 | elif (self.stopframe and frame is not self.stopframe |
| 404 | and self.stopframe.f_code.co_flags & GENERATOR_AND_COROUTINE_FLAGS |
| 405 | and arg[0] in (StopIteration, GeneratorExit)): |
| 406 | self.user_exception(frame, arg) |
| 407 | self.restart_events() |
| 408 | if self.quitting: raise BdbQuit |
| 409 | |
| 410 | return self.trace_dispatch |
| 411 | |
| 412 | def dispatch_opcode(self, frame, arg): |
| 413 | """Invoke user function and return trace function for opcode event. |
no test coverage detected