Exception: ZK::Exceptions::KeeperException

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

Overview

these errors are returned rather than the driver level errors

Class Method Summary collapse

Class Method Details

.by_code(code) ⇒ Object



35
36
37
# File 'lib/zk/exceptions.rb', line 35

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)


31
32
33
# File 'lib/zk/exceptions.rb', line 31

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