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

Method get_parts_of_chained_exception

IPython/core/ultratb.py:530–542  ·  view source on GitHub ↗
(self, evalue)

Source from the content-addressed store, hash-verified

528 ostream = property(_get_ostream, _set_ostream)
529
530 def get_parts_of_chained_exception(self, evalue):
531 def get_chained_exception(exception_value):
532 cause = getattr(exception_value, '__cause__', None)
533 if cause:
534 return cause
535 if getattr(exception_value, '__suppress_context__', False):
536 return None
537 return getattr(exception_value, '__context__', None)
538
539 chained_evalue = get_chained_exception(evalue)
540
541 if chained_evalue:
542 return chained_evalue.__class__, chained_evalue, chained_evalue.__traceback__
543
544 def prepare_chained_exception_message(self, cause):
545 direct_cause = "\nThe above exception was the direct cause of the following exception:\n"

Callers 2

structured_tracebackMethod · 0.80
structured_tracebackMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected