class Emarsys::Error

Custom error class for rescuing from Emarsys errors

Attributes

code[R]

Public Class Methods

new(code, text, status) click to toggle source
Calls superclass method
# File lib/emarsys/error.rb, line 7
def initialize(code, text, status)
  @code = code
  @text = text
  @status = status
  super(build_error_message)
end

Public Instance Methods

build_error_message() click to toggle source
# File lib/emarsys/error.rb, line 14
def build_error_message
  "HTTP-Code: #{@status}, Emarsys-Code: #{@code} - #{@text}"
end