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

Method show_exception_only

IPython/core/ultratb.py:825–838  ·  view source on GitHub ↗

Only print the exception type and message, without a traceback. Parameters ---------- etype : exception type value : exception value

(self, etype, evalue)

Source from the content-addressed store, hash-verified

823 return ListTB.structured_traceback(self, etype, value)
824
825 def show_exception_only(self, etype, evalue):
826 """Only print the exception type and message, without a traceback.
827
828 Parameters
829 ----------
830 etype : exception type
831 value : exception value
832 """
833 # This method needs to use __call__ from *this* class, not the one from
834 # a subclass whose signature or behavior may be different
835 ostream = self.ostream
836 ostream.flush()
837 ostream.write('\n'.join(self.get_exception_only(etype, evalue)))
838 ostream.flush()
839
840 def _some_str(self, value):
841 # Lifted from traceback.py

Callers

nothing calls this directly

Calls 3

get_exception_onlyMethod · 0.95
flushMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected