code: def handle_exception(self, frame, exc_info):
          
          type_, value, tb = exc_info
          # Python 3 is broken see http://bugs.python.org/issue17413
          _value = value
          if not isinstance(_value, BaseException):
              _value = type_(value)
          fake_exc_info = type_, _value, tb
          log.error('Exception during trace', exc_info=fake_exc_info)
          self.obj_cache[id(exc_info)] = exc_info
          self.extra_vars['__exception__'] = exc_info
          exception = type_.__name__
          exception_description = str(value)
          init = 'Echo|%s' % dump({
              'for': '__exception__',
              'val': escape('%s: %s') % (exception, exception_description)
          })
          # User exception is 4 frames away from exception
          frame = frame or sys._getframe().f_back.f_back.f_back.f_back
          self.interaction(
              frame, tb, exception, exception_description, init=init
          )
docs: This function is called if an exception occurs,
          but only if we are to stop at or just below this level.