Base class for all Autobuild exceptions
Creates a new exception which occured while doing *phase*
in target
# File lib/autobuild/exceptions.rb, line 12 def initialize(target = nil, phase = nil) @target, @phase = target, phase end
If the error is fatal
# File lib/autobuild/exceptions.rb, line 7 def fatal?; true end
If the error should be reported by mail
# File lib/autobuild/exceptions.rb, line 5 def mail?; false end
# File lib/autobuild/exceptions.rb, line 17 def to_s dir = if target.respond_to?(:srcdir) "(#{target.srcdir})" end target_name = if target.respond_to?(:name) target.name else target.to_str end if target && phase "#{target_name}#{dir}: failed in #{phase} phase\n #{super}" elsif target "#{target_name}#{dir}: #{super}" else super end end