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
          if type(exc_type) == type(''):
              exc_type_name = exc_type
          else: exc_type_name = exc_type.__name__
          print >>self.stdout, exc_type_name + ':', _saferepr(exc_value)
          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 if type ( exc_type ) == type ( '' ) : exc_type_name = exc_type else : exc_type_name = exc_type . __name__ print >> self . stdout , exc_type_name + ':' , _saferepr ( exc_value ) self . interaction ( frame , exc_traceback )