Only print the exception type and message, without a traceback. Parameters ---------- etype : exception type evalue : exception value
(
self, etype: BaseException | None, evalue: TracebackType | None
)
| 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 |
nothing calls this directly
no test coverage detected