MCPcopy Index your code
hub / github.com/python/cpython / user_exception

Method user_exception

Lib/pdb.py:608–625  ·  view source on GitHub ↗

This function is called if an exception occurs, but only if we are to stop at or just below this level.

(self, frame, exc_info)

Source from the content-addressed store, hash-verified

606 self.interaction(frame, None)
607
608 def user_exception(self, frame, exc_info):
609 """This function is called if an exception occurs,
610 but only if we are to stop at or just below this level."""
611 if self._wait_for_mainpyfile:
612 return
613 exc_type, exc_value, exc_traceback = exc_info
614 frame.f_locals['__exception__'] = exc_type, exc_value
615 self.set_convenience_variable(frame, '_exception', exc_value)
616
617 # An 'Internal StopIteration' exception is an exception debug event
618 # issued by the interpreter when handling a subgenerator run with
619 # 'yield from' or a generator controlled by a for loop. No exception has
620 # actually occurred in this case. The debugger uses this debug event to
621 # stop when the debuggee is returning from such generators.
622 prefix = 'Internal ' if (not exc_traceback
623 and exc_type is StopIteration) else ''
624 self.message('%s%s' % (prefix, self._format_exc(exc_value)))
625 self.interaction(frame, exc_traceback)
626
627 # General interaction function
628 def _cmdloop(self):

Callers

nothing calls this directly

Calls 4

messageMethod · 0.95
_format_excMethod · 0.95
interactionMethod · 0.95

Tested by

no test coverage detected