MCPcopy Index your code
hub / github.com/microsoft/playwright-python / rewrite_error

Function rewrite_error

playwright/_impl/_errors.py:57–64  ·  view source on GitHub ↗
(error: Exception, message: str)

Source from the content-addressed store, hash-verified

55
56
57def rewrite_error(error: Exception, message: str) -> Exception:
58 rewritten_exc = type(error)(message)
59 if isinstance(rewritten_exc, Error) and isinstance(error, Error):
60 rewritten_exc._name = error.name
61 rewritten_exc._stack = error.stack
62 rewritten_exc._details = error._details
63 rewritten_exc._log = error._log
64 return rewritten_exc

Callers 3

handleMethod · 0.90
wrap_api_callMethod · 0.90
wrap_api_call_syncMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected