Exception: Quonfig::Errors::MissingEnvironmentError

Inherits:
Quonfig::Error
  • Object
show all
Defined in:
lib/quonfig/errors/missing_environment_error.rb

Overview

Raised when datadir mode is engaged but no environment was supplied (neither the ‘environment:` option nor the QUONFIG_ENVIRONMENT env var is set). Datadir mode requires an explicit environment; without one the loader cannot pick the right environment row from each config’s ‘environments` array.

Instance Method Summary collapse

Constructor Details

#initialize(message = nil) ⇒ MissingEnvironmentError

Returns a new instance of MissingEnvironmentError.



11
12
13
14
15
# File 'lib/quonfig/errors/missing_environment_error.rb', line 11

def initialize(message = nil)
  message ||= '[quonfig] Environment required for datadir mode; ' \
              'set the `environment` option or QUONFIG_ENVIRONMENT env var'
  super(message)
end