Exception: Zookeeper::Exceptions::ZookeeperException
- Inherits:
-
StandardError
- Object
- StandardError
- Zookeeper::Exceptions::ZookeeperException
- Defined in:
- lib/zookeeper/exceptions.rb
Direct Known Subclasses
ApiError, AuthFailed, BadArguments, BadVersion, Closing, ConnectionClosed, ConnectionLoss, ContinuationTimeoutError, DataInconsistency, DataTooLargeException, EverythingOk, HandleClosedException, InheritedConnectionError, InterruptedException, InvalidACL, InvalidCallback, InvalidState, MarshallingError, NoAuth, NoChildrenForEphemerals, NoNode, NodeExists, NotConnected, NotEmpty, Nothing, OperationTimeOut, RunTimeInconsistency, SessionExpired, SessionMoved, ShuttingDownException, SystemError, Unimplemented
Constant Summary collapse
- CONST_MISSING_WARNING =
<<-EOS ------------------------------------------------------------------------------------------ WARNING! THE ZOOKEEPER NAMESPACE HAS CHANGED AS OF 1.0! Please update your code to use the new hierarchy! The constant that got you this was ZookeeperExceptions::ZookeeperException::%s stacktrace: %s ------------------------------------------------------------------------------------------ EOS
Class Method Summary collapse
-
.const_missing(const) ⇒ Object
NOTE(slyphon): Since 0.4 all of the ZookeeperException subclasses were defined inside of ZookeeperException, which always seemed well, icky.
Class Method Details
.const_missing(const) ⇒ Object
NOTE(slyphon): Since 0.4 all of the ZookeeperException subclasses were
defined inside of ZookeeperException, which always seemed well, icky.
if someone references one of these we'll print out a warning and
then give them the constant
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/zookeeper/exceptions.rb', line 31 def self.const_missing(const) if Zookeeper::Exceptions.const_defined?(const) stacktrace = caller[0..-2].reject {|n| n =~ %r%/rspec/% }.map { |n| "\t#{n}" }.join("\n") Zookeeper.deprecation_warning(CONST_MISSING_WARNING % [const.to_s, stacktrace]) Zookeeper::Exceptions.const_get(const).tap do |const_val| self.const_set(const, const_val) end else super end end |