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.



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

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.



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

def original_error
  @original_error
end

#xmlObject

Returns the value of attribute xml.



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

def xml
  @xml
end

Instance Method Details

#to_sObject



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

def to_s
  message = super

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