Show More
@@ -1976,10 +1976,19 b' class InteractiveShell(SingletonConfigurable):' | |||
|
1976 | 1976 | # Exception classes can customise their traceback - we |
|
1977 | 1977 | # use this in IPython.parallel for exceptions occurring |
|
1978 | 1978 | # in the engines. This should return a list of strings. |
|
1979 |
|
|
|
1979 | if hasattr(value, "_render_traceback_"): | |
|
1980 | stb = value._render_traceback_() | |
|
1981 | else: | |
|
1982 | stb = self.InteractiveTB.structured_traceback( | |
|
1983 | etype, value, tb, tb_offset=tb_offset | |
|
1984 | ) | |
|
1985 | ||
|
1980 | 1986 | except Exception: |
|
1981 | stb = self.InteractiveTB.structured_traceback(etype, | |
|
1982 | value, tb, tb_offset=tb_offset) | |
|
1987 | print( | |
|
1988 | "Unexpected exception formatting exception. Falling back to standard exception" | |
|
1989 | ) | |
|
1990 | traceback.print_exc() | |
|
1991 | return None | |
|
1983 | 1992 | |
|
1984 | 1993 | self._showtraceback(etype, value, stb) |
|
1985 | 1994 | if self.call_pdb: |
General Comments 0
You need to be logged in to leave comments.
Login now