Exception: ZK::Exceptions::KeeperException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/z_k/exceptions.rb

Overview

these errors are returned rather than the driver level errors

Class Method Summary collapse

Class Method Details

.by_code(code) ⇒ Object



33
34
35
# File 'lib/z_k/exceptions.rb', line 33

def self.by_code(code)
  ERROR_MAP.fetch(code.to_i) { raise "API ERROR: no exception defined for code: #{code}" }
end

.recognized_code?(code) ⇒ Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/z_k/exceptions.rb', line 29

def self.recognized_code?(code)
  ERROR_MAP.include?(code)
end