Exception: SOCMaker::ERR::ConsistenceError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- SOCMaker::ERR::ConsistenceError
- Defined in:
- lib/soc_maker/err.rb
Overview
Consistence errors: occur during the consistence check of the classes or in a few methods, where a inconsistence can be caused by external call. A cause for this error could be, that a core or interface doesn’t exist in the library. Or a port in of a IfcDef is not defined in the IfcSpc.
Instance Attribute Summary collapse
-
#optinal ⇒ Object
readonly
Optional error information.
Instance Method Summary collapse
-
#initialize(message, o = {}) ⇒ ConsistenceError
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 = {}) ⇒ ConsistenceError
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
122 123 124 125 126 |
# File 'lib/soc_maker/err.rb', line 122 def initialize( , o={} ) super @optional = o SOCMaker::logger.error( "Consistence Error Raised: #{message} #{ "\n\t\t" + o.inspect if o.size > 0}" ) end |
Instance Attribute Details
#optinal ⇒ Object (readonly)
Optional error information
115 116 117 |
# File 'lib/soc_maker/err.rb', line 115 def optinal @optinal end |
Instance Method Details
#to_s ⇒ Object
Returns a string describing this error
130 131 132 |
# File 'lib/soc_maker/err.rb', line 130 def to_s "#{super} #{ "\n\t\t" + @optional.inspect if @optional.size > 0}" end |