Exception: Solace::Errors::ParseError
- Inherits:
-
StandardError
- Object
- StandardError
- Solace::Errors::ParseError
- Defined in:
- lib/solace/errors/parse_error.rb
Overview
JSON parsing failed
Instance Attribute Summary collapse
- #body ⇒ Object readonly
Class Method Summary collapse
-
.format_response(error, response) ⇒ Solace::Errors::ParseError
Formats a response to an error.
Instance Method Summary collapse
-
#initialize(message, body:) ⇒ ParseError
constructor
A new instance of ParseError.
Constructor Details
#initialize(message, body:) ⇒ ParseError
Returns a new instance of ParseError.
11 12 13 14 |
# File 'lib/solace/errors/parse_error.rb', line 11 def initialize(, body:) super() @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
7 8 9 |
# File 'lib/solace/errors/parse_error.rb', line 7 def body @body end |
Class Method Details
.format_response(error, response) ⇒ Solace::Errors::ParseError
Formats a response to an error
21 22 23 |
# File 'lib/solace/errors/parse_error.rb', line 21 def self.format_response(error, response) new("Invalid JSON from RPC: #{error.}", body: response.body) end |