Exception: SOCMaker::ERR::InitError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- SOCMaker::ERR::InitError
- Defined in:
- lib/soc_maker/err.rb
Overview
Initialization errors: occur during the initialization of the classes. A cause for this error could be a wrong structure of the YAML file, for example wrong data types.
Instance Attribute Summary collapse
-
#optinal ⇒ Object
readonly
Optional error information.
Instance Method Summary collapse
-
#initialize(message, o = {}) ⇒ InitError
constructor
- This constructor saves the message and optional infos and adds a log entry via SOCMaker::logger.error
message
- the error message
o
-
optional error information.
- the error message
- This constructor saves the message and optional infos and adds a log entry via SOCMaker::logger.error
-
#to_s ⇒ Object
Returns a string describing this error.
Constructor Details
#initialize(message, o = {}) ⇒ InitError
This constructor saves the message and optional infos and adds a log entry via SOCMaker::logger.error
message
-
the error message
o
-
optional error information
173 174 175 176 177 178 179 |
# File 'lib/soc_maker/err.rb', line 173 def initialize( , o={} ) super @optional = o if SOCMaker::logger SOCMaker::logger.error( "Initialization Error Raised: #{} #{ "\n\t\t" + o.inspect if o.size > 0}" ) end end |
Instance Attribute Details
#optinal ⇒ Object (readonly)
Optional error information
166 167 168 |
# File 'lib/soc_maker/err.rb', line 166 def optinal @optinal end |
Instance Method Details
#to_s ⇒ Object
Returns a string describing this error
183 184 185 |
# File 'lib/soc_maker/err.rb', line 183 def to_s "#{super} #{ "\n\t\t" + @optional.inspect if @optional.size > 0}" end |