Exception: ConstConf::Errors::SettingAlreadyDefined

Inherits:
ConfigurationError show all
Defined in:
lib/const_conf/errors.rb

Overview

A custom exception class raised when a configuration setting is defined more than once in the ConstConf system.

This exception is used to prevent duplicate configuration settings from being registered, ensuring that each environment variable name maps to a single configuration value within a given module hierarchy.

Examples:

Handling a duplicate setting definition

begin
  # Code that would cause a SettingAlreadyDefined error
rescue ConstConf::SettingAlreadyDefined => e
  # Handle the duplicate setting appropriately
end