MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / script_error_from_log_entry

Function script_error_from_log_entry

py/private/_script_handlers.py:311–322  ·  view source on GitHub ↗

Build a :class:`ScriptError` from raw ``log.entryAdded`` params.

(params: dict)

Source from the content-addressed store, hash-verified

309
310
311def script_error_from_log_entry(params: dict) -> ScriptError:
312 """Build a :class:`ScriptError` from raw ``log.entryAdded`` params."""
313 frames = _stack_frames(params.get("stackTrace"))
314 top = frames[0] if frames else {}
315 return ScriptError(
316 message=params.get("text"),
317 source=top.get("url"),
318 line_number=top.get("lineNumber"),
319 column_number=top.get("columnNumber"),
320 stack_trace=_format_stack_trace(params.get("stackTrace")),
321 timestamp=params.get("timestamp"),
322 )
323
324
325def script_error_from_exception_details(details: dict) -> ScriptError:

Callers 1

_dispatchMethod · 0.85

Calls 4

_stack_framesFunction · 0.85
ScriptErrorClass · 0.85
_format_stack_traceFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected