Module: Mirah::Util::ProcessErrors
Instance Method Summary collapse
-
#process_errors(errors) ⇒ Object
errors - array of NodeErrors.
Instance Method Details
#process_errors(errors) ⇒ Object
errors - array of NodeErrors
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/mirah/util/process_errors.rb', line 20 def process_errors(errors) errors.each do |ex| puts ex if ex.node Mirah.print_error(ex., ex.position) else puts ex. end if ex.kind_of?(Mirah::InternalCompilerError) && ex.cause puts ex.cause puts ex.cause.backtrace elsif @verbose puts ex.backtrace end end throw :exit, 1 unless errors.empty? end |