Exception: Mailgun::Error

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

Overview

Public: A basic class for mananging errors. Inherits from StandardError (previously RuntimeError) as not all errors are runtime errors.

Direct Known Subclasses

CommunicationError, ParameterError, ParseError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, object = nil) ⇒ Error

Public: initialize a Mailgun:Error object

message - a String describing the error object - an object with details about the error



17
18
19
20
# File 'lib/mailgun/exceptions/exceptions.rb', line 17

def initialize(message = nil, object = nil)
  super(message)
  @object = object
end

Instance Attribute Details

#objectObject (readonly)

Public: get an object an error is instantiated with



11
12
13
# File 'lib/mailgun/exceptions/exceptions.rb', line 11

def object
  @object
end