code: def getexcfo(e):
      '''
      Get an err tufo from an exception.
  
      Args:
          e (Exception): An Exception (or Exception subclass).
  
      Notes:
          This can be called outside of the context of an exception handler,
          however details such as file, line, function name and source may be
          missing.
  
      Returns:
          ((str, dict)):
      '''
      tb = sys.exc_info()[2]
      tbinfo = traceback.extract_tb(tb)
      path, line, name, src = '', '', '', None
      if tbinfo:
          path, line, name, sorc = tbinfo[-1]
      retd = {
          'msg': str(e),
          'file': path,
          'line': line,
          'name': name,
          'src': src
      }
  
      if isinstance(e, s_exc.SynErr):
          retd['syn:err'] = e.errinfo
  
      return (e.__class__.__name__, retdf getexcfo(e):
      '''
      Get an err tufo from an exception.
  
      Args:
          e (Exception): An Exception (or Exception subclass).
  
      Notes:
          This can be called outside of the context of an exception handler,
          however details such as file, line, function name and source may be
          missing.
  
      Returns:
          ((str, dict)):
      '''
      tb = sys.exc_info()[2]
      tbinfo = traceback.extract_tb(tb)
      path, line, name, src = '', '', '', None
      if tbinfo:
          path, line, name, sorc = tbinfo[-1]
      retd = {
          'msg': str(e),
          'file': path,
          'line': line,
          'name': name,
          'src': src
      }
  
      if isinstance(e, s_exc.SynErr):
          retd['syn:err'] = e.errinfo
  
      return (e.__class__.__name__, retd)
docs: Get an err tufo from an exception.
  
      Args:
          e (Exception): An Exception (or Exception subclass).
  
      Notes:
          This can be called outside of the context of an exception handler,
          however details such as file, line, function name and source may be
          missing.
  
      Returns:
          ((str, dict)):