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.



80
81
82
83
84
# File 'lib/freshbooks.rb', line 80

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.



78
79
80
# File 'lib/freshbooks.rb', line 78

def original_error
  @original_error
end

#xmlObject

Returns the value of attribute xml.



78
79
80
# File 'lib/freshbooks.rb', line 78

def xml
  @xml
end

Instance Method Details

#to_sObject



86
87
88
89
90
91
92
# File 'lib/freshbooks.rb', line 86

def to_s
  message = super

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