Exception: Lightpanda::JavaScriptError
- Defined in:
- lib/lightpanda/errors.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(response) ⇒ JavaScriptError
constructor
A new instance of JavaScriptError.
Constructor Details
#initialize(response) ⇒ JavaScriptError
Returns a new instance of JavaScriptError.
26 27 28 29 30 31 32 |
# File 'lib/lightpanda/errors.rb', line 26 def initialize(response) @class_name = response.dig("exceptionDetails", "exception", "className") = response.dig("exceptionDetails", "exception", "description") || response.dig("exceptionDetails", "text") super() end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
24 25 26 |
# File 'lib/lightpanda/errors.rb', line 24 def class_name @class_name end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
24 25 26 |
# File 'lib/lightpanda/errors.rb', line 24 def end |