Exception: Mailosaur::MailosaurError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/Mailosaur/mailosaur_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = '', error_type = '', http_status_code = nil, http_response_body = nil) ⇒ MailosaurError

Returns a new instance of MailosaurError.



5
6
7
8
9
10
11
# File 'lib/Mailosaur/mailosaur_error.rb', line 5

def initialize(message = '', error_type = '', http_status_code = nil, http_response_body = nil)
  super(message)

  @error_type = error_type
  @http_status_code = http_status_code
  @http_response_body = http_response_body
end

Instance Attribute Details

#error_typeObject (readonly)

Returns the value of attribute error_type.



3
4
5
# File 'lib/Mailosaur/mailosaur_error.rb', line 3

def error_type
  @error_type
end

#http_response_bodyObject (readonly)

Returns the value of attribute http_response_body.



3
4
5
# File 'lib/Mailosaur/mailosaur_error.rb', line 3

def http_response_body
  @http_response_body
end

#http_status_codeObject (readonly)

Returns the value of attribute http_status_code.



3
4
5
# File 'lib/Mailosaur/mailosaur_error.rb', line 3

def http_status_code
  @http_status_code
end