MCPcopy Create free account
hub / github.com/ipython/ipython / get_exception_only

Method get_exception_only

IPython/core/interactiveshell.py:1998–2005  ·  view source on GitHub ↗

Return as a string (ending with a newline) the exception that just occurred, without any traceback.

(self, exc_tuple=None)

Source from the content-addressed store, hash-verified

1996 print("UsageError: %s" % exc, file=sys.stderr)
1997
1998 def get_exception_only(self, exc_tuple=None):
1999 """
2000 Return as a string (ending with a newline) the exception that
2001 just occurred, without any traceback.
2002 """
2003 etype, value, tb = self._get_exc_info(exc_tuple)
2004 msg = traceback.format_exception_only(etype, value)
2005 return ''.join(msg)
2006
2007 def showtraceback(self, exc_tuple=None, filename=None, tb_offset=None,
2008 exception_only=False, running_compiled_code=False):

Callers 3

showtracebackMethod · 0.95
system_rawMethod · 0.95
_user_obj_errorMethod · 0.45

Calls 1

_get_exc_infoMethod · 0.95

Tested by

no test coverage detected