Exception: Kybus::Exceptions::KybusError

Inherits:
KybusBaseException show all
Defined in:
lib/kybus/exceptions.rb

Overview

Is used to express an error that was found during the execution of the program but it also means that the invoked endpoint has not the power to fix it, so it will only complain.

Instance Attribute Summary

Attributes inherited from KybusBaseException

#code, #data, #message

Instance Method Summary collapse

Methods inherited from KybusBaseException

#to_h, #to_log_format

Constructor Details

#initialize(message, code = nil, data = {}) ⇒ KybusError

Returns a new instance of KybusError.



66
67
68
69
70
# File 'lib/kybus/exceptions.rb', line 66

def initialize(message, code = nil, data = {})
  code ||= self.class.name.split('::').last
  code = 'ServerError' if code == 'kybusError'
  super
end