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

Method _user_obj_error

IPython/core/interactiveshell.py:2856–2872  ·  view source on GitHub ↗

return simple exception dict for use in user_expressions

(self)

Source from the content-addressed store, hash-verified

2854 #-------------------------------------------------------------------------
2855
2856 def _user_obj_error(self):
2857 """return simple exception dict
2858
2859 for use in user_expressions
2860 """
2861
2862 etype, evalue, tb = self._get_exc_info()
2863 stb = self.InteractiveTB.get_exception_only(etype, evalue)
2864
2865 exc_info = {
2866 "status": "error",
2867 "traceback": stb,
2868 "ename": etype.__name__,
2869 "evalue": py3compat.safe_unicode(evalue),
2870 }
2871
2872 return exc_info
2873
2874 def _format_user_obj(self, obj):
2875 """format a user object to display dict

Callers 1

user_expressionsMethod · 0.95

Calls 2

_get_exc_infoMethod · 0.95
get_exception_onlyMethod · 0.45

Tested by

no test coverage detected