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


15
16
17
18
# File 'lib/mailgun/exceptions/exceptions.rb', line 15

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


9
10
11
# File 'lib/mailgun/exceptions/exceptions.rb', line 9

def object
  @object
end