MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _getval_except

Method _getval_except

tools/python-3.11.9-amd64/Lib/pdb.py:1237–1246  ·  view source on GitHub ↗
(self, arg, frame=None)

Source from the content-addressed store, hash-verified

1235 raise
1236
1237 def _getval_except(self, arg, frame=None):
1238 try:
1239 if frame is None:
1240 return eval(arg, self.curframe.f_globals, self.curframe_locals)
1241 else:
1242 return eval(arg, frame.f_globals, frame.f_locals)
1243 except:
1244 exc_info = sys.exc_info()[:2]
1245 err = traceback.format_exception_only(*exc_info)[-1].strip()
1246 return _rstr('** raised %s **' % err)
1247
1248 def _error_exc(self):
1249 exc_info = sys.exc_info()[:2]

Callers 2

preloopMethod · 0.95
do_displayMethod · 0.95

Calls 3

_rstrClass · 0.85
stripMethod · 0.80
format_exception_onlyMethod · 0.80

Tested by

no test coverage detected