Exception: MxxRu::GlobalOptionDisallowedValueEx

Inherits:
Ex
  • Object
show all
Defined in:
lib/mxx_ru/ex.rb

Overview

Exception, thrown if anyone tries to set invalid value to global options such as runtime_mode, rtl_mode, etc.

Instance Method Summary collapse

Constructor Details

#initialize(a_name, a_available_values, a_new, a_new_owner) ⇒ GlobalOptionDisallowedValueEx

a_name

Option name.

a_available_values

Available values list. Should be Array of String.

a_new

New option value.

a_new_owner

Who tries to set new value.



117
118
119
120
121
122
123
124
125
126
# File 'lib/mxx_ru/ex.rb', line 117

def initialize(
  a_name,
  a_available_values,
  a_new,
  a_new_owner )

  super( "Value '#{new}' required by '#{a_new_owner}' " +
    "disallowed for global option '#{a_name}'! " +
    "Allowed values are: #{a_available_values.join(' ')}" )
end