MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / trace_exception

Method trace_exception

_pydevd_bundle/pydevd_frame.py:183–206  ·  view source on GitHub ↗
(self, frame, event, arg)

Source from the content-addressed store, hash-verified

181 # cdef tuple exc_info;
182 # ELSE
183 def trace_exception(self, frame, event, arg):
184 # ENDIF
185 if event == "exception":
186 should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info)
187 self.exc_info = exc_info
188
189 if should_stop:
190 if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED):
191 return self.trace_dispatch
192
193 elif event == "return":
194 exc_info = self.exc_info
195 if exc_info and arg is None:
196 frame_skips_cache, frame_cache_key = self._args[4], self._args[5]
197 custom_key = (frame_cache_key, "try_exc_info")
198 container_obj = frame_skips_cache.get(custom_key)
199 if container_obj is None:
200 container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj()
201 if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and self.handle_user_exception(
202 frame
203 ):
204 return self.trace_dispatch
205
206 return self.trace_exception
207
208 def handle_user_exception(self, frame):
209 exc_info = self.exc_info

Callers

nothing calls this directly

Calls 6

handle_user_exceptionMethod · 0.95
should_stop_on_exceptionFunction · 0.85
handle_exceptionFunction · 0.85
is_unhandled_exceptionFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected