MCPcopy Index your code
hub / github.com/ipython/ipython / show_exception_only

Method show_exception_only

IPython/core/ultratb.py:455–470  ·  view source on GitHub ↗

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

(
        self, etype: BaseException | None, evalue: TracebackType | None
    )

Source from the content-addressed store, hash-verified

453 return out_list
454
455 def show_exception_only(
456 self, etype: BaseException | None, evalue: TracebackType | None
457 ) -> None:
458 """Only print the exception type and message, without a traceback.
459
460 Parameters
461 ----------
462 etype : exception type
463 evalue : exception value
464 """
465 # This method needs to use __call__ from *this* class, not the one from
466 # a subclass whose signature or behavior may be different
467 ostream = self.ostream
468 ostream.flush()
469 ostream.write("\n".join(self.get_exception_only(etype, evalue)))
470 ostream.flush()
471
472 def _some_str(self, value: Any) -> str:
473 # 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