Sha256: b330e08daf643e53c54dd5525e6ec454b44b479c42d2157c5463dd2457e4c36f
Contents?: true
Size: 766 Bytes
Versions: 7
Compression:
Stored size: 766 Bytes
Contents
module Locomotive module Wagon class DefaultException < ::Exception def initialize(message = nil, parent_exception = nil) self.log_backtrace(parent_exception) if parent_exception super(message) end protected def log_backtrace(parent_exception) full_error_message = "#{parent_exception.message}\n\t" full_error_message += parent_exception.backtrace.join("\n\t") full_error_message += "\n\n" Locomotive::Wagon::Logger.fatal full_error_message end end class MounterException < DefaultException end class GeneratorException < DefaultException def log_backtrace(parent_exception) # Logger not initialized at this step end end end end
Version data entries
7 entries across 7 versions & 1 rubygems