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



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

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



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

def object
  @object
end