Exception: Webhookdb::ExceptionCarrier

Inherits:
WebhookdbError show all
Defined in:
lib/webhookdb.rb

Overview

This exception is rescued in the API and returned to the caller via merror!. This is mostly used in synchronously-processed replicators that need to return very specific types of errors during processing. This is very rare.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, message, code: nil, more: {}, headers: {}) ⇒ ExceptionCarrier

Returns a new instance of ExceptionCarrier.



156
157
158
159
160
161
162
# File 'lib/webhookdb.rb', line 156

def initialize(status, message, code: nil, more: {}, headers: {})
  super(message)
  @status = status
  @code = code
  @more = more
  @headers = headers
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



154
155
156
# File 'lib/webhookdb.rb', line 154

def code
  @code
end

#headersObject (readonly)

Returns the value of attribute headers.



154
155
156
# File 'lib/webhookdb.rb', line 154

def headers
  @headers
end

#moreObject (readonly)

Returns the value of attribute more.



154
155
156
# File 'lib/webhookdb.rb', line 154

def more
  @more
end

#statusObject (readonly)

Returns the value of attribute status.



154
155
156
# File 'lib/webhookdb.rb', line 154

def status
  @status
end