Exception: Ferrum::BrowserError
- Defined in:
- lib/ferrum/errors.rb,
sig/ferrum/errors.rbs
Overview
Raised when the browser returns an error response over CDP. Wraps the raw response so callers can inspect its code and data.
Direct Known Subclasses
ExecutionContextDestroyedError, ForeignObjectError, JavaScriptError, NoExecutionContextError, NodeNotFoundError, ResultTooDeepError
Instance Attribute Summary collapse
-
#response ⇒ Hash[String, untyped]
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#code ⇒ Integer?
Error code from the raw CDP error response.
-
#data ⇒ Object?
Additional data from the raw CDP error response.
-
#initialize(response) ⇒ BrowserError
constructor
A new instance of BrowserError.
Constructor Details
#initialize(response) ⇒ BrowserError
Returns a new instance of BrowserError.
240 241 242 243 |
# File 'lib/ferrum/errors.rb', line 240 def initialize(response) @response = response super(response["message"]) end |
Instance Attribute Details
#response ⇒ Hash[String, untyped] (readonly)
Returns the value of attribute response.
238 239 240 |
# File 'lib/ferrum/errors.rb', line 238 def response @response end |
Instance Method Details
#code ⇒ Integer?
Error code from the raw CDP error response.
250 251 252 |
# File 'lib/ferrum/errors.rb', line 250 def code response["code"] end |
#data ⇒ Object?
Additional data from the raw CDP error response.
259 260 261 |
# File 'lib/ferrum/errors.rb', line 259 def data response["data"] end |