Exception: Mailchimp::APIError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/mailchimp/api_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error, code) ⇒ APIError

Returns a new instance of APIError.



4
5
6
7
8
# File 'lib/mailchimp/api_error.rb', line 4

def initialize(error,code)
  super("Error from MailChimp API: #{error} (code #{code})")
  @error = error
  @code = code
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



3
4
5
# File 'lib/mailchimp/api_error.rb', line 3

def code
  @code
end

#errorObject

Returns the value of attribute error.



3
4
5
# File 'lib/mailchimp/api_error.rb', line 3

def error
  @error
end