Exception: FreshBooks::ParseError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(original_error, xml, msg = nil) ⇒ ParseError

Returns a new instance of ParseError.


93
94
95
96
97
# File 'lib/freshbooks.rb', line 93

def initialize(original_error, xml, msg = nil)
  @original_error = original_error
  @xml = xml
  super(msg)
end

Instance Attribute Details

#original_errorObject

Returns the value of attribute original_error


91
92
93
# File 'lib/freshbooks.rb', line 91

def original_error
  @original_error
end

#xmlObject

Returns the value of attribute xml


91
92
93
# File 'lib/freshbooks.rb', line 91

def xml
  @xml
end

Instance Method Details

#to_sObject


99
100
101
102
103
104
105
# File 'lib/freshbooks.rb', line 99

def to_s
  message = super

  "Original Error: #{original_error.to_s}\n" +
  "XML: #{xml.to_s}\n" +
  "Message: #{message}\n"
end