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

Method prepare_chained_exception_message

IPython/core/tbtools.py:476–490  ·  view source on GitHub ↗
(
        self, cause: BaseException | None
    )

Source from the content-addressed store, hash-verified

474 return None
475
476 def prepare_chained_exception_message(
477 self, cause: BaseException | None
478 ) -> list[list[str]]:
479 direct_cause = (
480 "\nThe above exception was the direct cause of the following exception:\n"
481 )
482 exception_during_handling = (
483 "\nDuring handling of the above exception, another exception occurred:\n"
484 )
485
486 if cause:
487 message = [[direct_cause]]
488 else:
489 message = [[exception_during_handling]]
490 return message
491
492 @property
493 def has_colors(self) -> bool:

Callers 4

structured_tracebackMethod · 0.80
structured_tracebackMethod · 0.80
structured_tracebackMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected