lib/flipper/errors.rb in flipper-0.11.0.beta6 vs lib/flipper/errors.rb in flipper-0.11.0.beta7
- old
+ new
@@ -10,8 +10,15 @@
end
# Raised when attempting to declare a group name that has already been used.
class DuplicateGroup < Error; end
- # Raised when attempting to access a group that is not registered.
- class GroupNotRegistered < Error; end
+ # Raised when default instance not configured but there is an attempt to
+ # use it.
+ class DefaultNotSet < Flipper::Error
+ def initialize(message = nil)
+ default = "Default flipper instance not configured. See " \
+ "Flipper.configure for how to configure the default instance."
+ super(message || default)
+ end
+ end
end