Sha256: c32db24e4565eab4548f3c078db9b050e0017870b1732fb5023e42ffb09e2d2c

Contents?: true

Size: 462 Bytes

Versions: 20

Compression:

Stored size: 462 Bytes

Contents

module ReactOnRails
  class JsonParseError < ::ReactOnRails::Error
    attr_reader :json

    def initialize(parse_error, json)
      @json = json
      @original_error = parse_error
      super(parse_error.message)
    end

    def to_honeybadger_context
      to_error_context
    end

    def raven_context
      to_error_context
    end

    def to_error_context
      {
        original_error: @original_error,
        json: @json
      }
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
react_on_rails-11.3.1 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.3.1.beta.0 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.3.0 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.2.2 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.2.1 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.1.8 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.1.7 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.1.6 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.1.5 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.1.4 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.1.3 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.1.2 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.1.1 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.1.0 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.1.0.beta.1 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.0.10 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.0.9 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.0.8 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.0.7 lib/react_on_rails/json_parse_error.rb
react_on_rails-11.0.6 lib/react_on_rails/json_parse_error.rb