Exception: MultiJson::ParseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/multi_json/parse_error.rb

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Attribute Details

- (Object) cause (readonly)

Returns the value of attribute cause



3
4
5
# File 'lib/multi_json/parse_error.rb', line 3

def cause
  @cause
end

- (Object) data (readonly)

Returns the value of attribute data



3
4
5
# File 'lib/multi_json/parse_error.rb', line 3

def data
  @data
end

Class Method Details

+ (Object) build(original_exception, data)



5
6
7
8
9
10
11
12
13
# File 'lib/multi_json/parse_error.rb', line 5

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