parameters: (self, frame, exc_info)
docstring: This function is called if an exception occurs,
          but only if we are to stop at or just below this level.
docstring_summary: This function is called if an exception occurs,
          but only if we are to stop at or just below this level.
docstring_tokens: This function is called if an exception occurs but only if we are to stop at or just below this level .
function: def user_exception(self, frame, exc_info):
          """This function is called if an exception occurs,
          but only if we are to stop at or just below this level."""
          if self._wait_for_mainpyfile:
              return
          exc_type, exc_value, exc_traceback = exc_info
          frame.f_locals['__exception__'] = exc_type, exc_value
  
          # An 'Internal StopIteration' exception is an exception debug event
          # issued by the interpreter when handling a subgenerator run with
          # 'yield from' or a generator controlled by a for loop. No exception has
          # actually occurred in this case. The debugger uses this debug event to
          # stop when the debuggee is returning from such generators.
          prefix = 'Internal ' if (not exc_traceback
                                      and exc_type is StopIteration) else ''
          self.message('%s%s' % (prefix,
              traceback.format_exception_only(exc_type, exc_value)[-1].strip()))
          self.interaction(frame, exc_traceback)
function_tokens: def user_exception ( self , frame , exc_info ) : if self . _wait_for_mainpyfile : return exc_type , exc_value , exc_traceback = exc_info frame . f_locals [ '__exception__' ] = exc_type , exc_value # An 'Internal StopIteration' exception is an exception debug event # issued by the interpreter when handling a subgenerator run with # 'yield from' or a generator controlled by a for loop. No exception has # actually occurred in this case. The debugger uses this debug event to # stop when the debuggee is returning from such generators. prefix = 'Internal ' if ( not exc_traceback and exc_type is StopIteration ) else '' self . message ( '%s%s' % ( prefix , traceback . format_exception_only ( exc_type , exc_value ) [ - 1 ] . strip ( ) ) ) self . interaction ( frame , exc_traceback )