Exception: ReactOnRails::JsonParseError
- Defined in:
- lib/react_on_rails/json_parse_error.rb
Instance Attribute Summary collapse
-
#json ⇒ Object
readonly
Returns the value of attribute json.
Instance Method Summary collapse
-
#initialize(parse_error, json) ⇒ JsonParseError
constructor
A new instance of JsonParseError.
- #raven_context ⇒ Object
- #to_error_context ⇒ Object
- #to_honeybadger_context ⇒ Object
Constructor Details
#initialize(parse_error, json) ⇒ JsonParseError
Returns a new instance of JsonParseError.
7 8 9 10 11 |
# File 'lib/react_on_rails/json_parse_error.rb', line 7 def initialize(parse_error, json) @json = json @original_error = parse_error super(parse_error.) end |
Instance Attribute Details
#json ⇒ Object (readonly)
Returns the value of attribute json.
5 6 7 |
# File 'lib/react_on_rails/json_parse_error.rb', line 5 def json @json end |
Instance Method Details
#raven_context ⇒ Object
17 18 19 |
# File 'lib/react_on_rails/json_parse_error.rb', line 17 def raven_context to_error_context end |
#to_error_context ⇒ Object
21 22 23 24 25 26 |
# File 'lib/react_on_rails/json_parse_error.rb', line 21 def to_error_context { original_error: @original_error, json: @json } end |
#to_honeybadger_context ⇒ Object
13 14 15 |
# File 'lib/react_on_rails/json_parse_error.rb', line 13 def to_honeybadger_context to_error_context end |