Exception: Puppet::Util::Json::ParseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/puppet/util/json.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#causeObject (readonly)

Returns the value of attribute cause


4
5
6
# File 'lib/puppet/util/json.rb', line 4

def cause
  @cause
end

#dataObject (readonly)

Returns the value of attribute data


4
5
6
# File 'lib/puppet/util/json.rb', line 4

def data
  @data
end

Class Method Details

.build(original_exception, data) ⇒ Object


6
7
8
9
10
11
12
13
14
# File 'lib/puppet/util/json.rb', line 6

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