All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gems.multi_json-1.11.2.lib.multi_json.parse_error.rb Maven / Gradle / Ivy

There is a newer version: 3.7.2
Show newest version
module MultiJson
  class ParseError < StandardError
    attr_reader :data, :cause

    def self.build(original_exception, data)
      new(original_exception.message).tap do |exception|
        exception.instance_eval do
          @cause = original_exception
          set_backtrace original_exception.backtrace
          @data = data
        end
      end
    end
  end

  DecodeError = LoadError = ParseError # Legacy support
end




© 2015 - 2025 Weber Informatics LLC | Privacy Policy