Sha256: dfcd1514a87649fd64e83010d90bf6ed5660fec6bd3b64dbf3a717613d05e009

Contents?: true

Size: 493 Bytes

Versions: 22

Compression:

Stored size: 493 Bytes

Contents

# frozen_string_literal: true

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

22 entries across 22 versions & 1 rubygems

Version Path
react_on_rails-13.0.0.beta.0 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.6.0 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.5.2 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.5.1 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.5.0 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.4.0 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.4.0.rc.0 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.3.0 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.2.0 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.1.0 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.0.5.beta.0 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.0.4 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.0.3 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.0.3.beta.0 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.0.2 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.0.1 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.0.0 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.0.0.pre.beta.4 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.0.0.pre.beta.3 lib/react_on_rails/json_parse_error.rb
react_on_rails-12.0.0.pre.beta.2 lib/react_on_rails/json_parse_error.rb