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:190–201  ·  view source on GitHub ↗

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

(params: dict)

Source from the content-addressed store, hash-verified

188
189
190def script_error_from_log_entry(params: dict) -> ScriptError:
191 """Build a :class:`ScriptError` from raw ``log.entryAdded`` params."""
192 frames = _stack_frames(params.get("stackTrace"))
193 top = frames[0] if frames else {}
194 return ScriptError(
195 message=params.get("text"),
196 source=top.get("url"),
197 line_number=top.get("lineNumber"),
198 column_number=top.get("columnNumber"),
199 stack_trace=_format_stack_trace(params.get("stackTrace")),
200 timestamp=params.get("timestamp"),
201 )
202
203
204def script_error_from_exception_details(details: dict) -> ScriptError:

Callers 1

_dispatchMethod · 0.85

Calls 4

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

Tested by

no test coverage detected