module SOCMaker::ERR
This sub-module contains some error-functionallity, which is used in different classes via mixins.
Public Instance Methods
consistence_error( msg, o={} )
click to toggle source
Method to raise a consistence error
msg
-
error message
o
-
optional info
# File lib/soc_maker/err.rb, line 140 def consistence_error( msg, o={} ) raise ConsistenceError.new( msg, o ) end
consistence_error_if( con, msg, o={} )
click to toggle source
Method to raise a consistence error if the condition is true
con
-
condition
msg
-
error message
o
-
optional info
# File lib/soc_maker/err.rb, line 149 def consistence_error_if( con, msg, o={} ) if !!(con) consistence_error( msg, o ) end end
init_error( msg, o={} )
click to toggle source
Method to raise an initialization error
msg
-
error message
o
-
optional info
# File lib/soc_maker/err.rb, line 193 def init_error( msg, o={} ) raise InitError.new( msg, o ) end
init_error_if( con, msg, o={} )
click to toggle source
Method to raise an initialization error if the condition is true
con
-
condition
msg
-
error message
o
-
optional info
# File lib/soc_maker/err.rb, line 202 def init_error_if( con, msg, o={} ) if !!(con) init_error( msg, o ) end end
processing_error( msg, o={} )
click to toggle source
Method to raise a processing error
msg
-
error message
o
-
optional info
# File lib/soc_maker/err.rb, line 83 def processing_error( msg, o={} ) raise ProcessingError.new( msg, o ) end
processing_error_if( res, msg, o={} )
click to toggle source
Method to raise a processing error if the condition is true
con
-
condition
msg
-
error message
o
-
optional info
# File lib/soc_maker/err.rb, line 92 def processing_error_if( res, msg, o={} ) if !!(res) processing_error( msg, o ) end end