Exception: InfusionAPIError

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

Overview

Extend StandardError to keep track of Error being wrapped Pattern from Exceptional Ruby by Avdi Grimm (avdi.org/talks/exceptional-ruby-2011-02-04/)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, original = nil) ⇒ InfusionAPIError

Returns a new instance of InfusionAPIError.



5
6
7
8
9
# File 'lib/infusionsoft/exceptions.rb', line 5

def initialize(msg, original=nil);
Infusionsoft.api_logger.error "ERROR: #{msg}"
super(msg);
@original = original;
end

Instance Attribute Details

#originalObject (readonly)

Returns the value of attribute original.



4
5
6
# File 'lib/infusionsoft/exceptions.rb', line 4

def original
  @original
end