Exception: Ferrum::BrowserError
- Defined in:
- lib/ferrum/errors.rb
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
Instance Attribute Summary collapse
-
#response ⇒ Object
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.
131 132 133 134 |
# File 'lib/ferrum/errors.rb', line 131 def initialize(response) @response = response super(response["message"]) end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
129 130 131 |
# File 'lib/ferrum/errors.rb', line 129 def response @response end |
Instance Method Details
#code ⇒ Integer?
Error code from the raw CDP error response.
141 142 143 |
# File 'lib/ferrum/errors.rb', line 141 def code response["code"] end |
#data ⇒ Object?
Additional data from the raw CDP error response.
150 151 152 |
# File 'lib/ferrum/errors.rb', line 150 def data response["data"] end |