class Autobuild::Exception
Base class for all Autobuild
exceptions
Attributes
Public Class Methods
Source
# File lib/autobuild/exceptions.rb, line 22 def initialize(target = nil, phase = nil, options = Hash.new) options = Kernel.validate_options options, retry: true @target = target @phase = phase @retry = options[:retry] super() end
Creates a new exception which occured while doing *phase*
in target
Calls superclass method
Public Instance Methods
Source
# File lib/autobuild/exceptions.rb, line 10 def fatal? true end
If the error is fatal
Source
# File lib/autobuild/exceptions.rb, line 5 def mail? false end
If the error should be reported by mail
Source
# File lib/autobuild/exceptions.rb, line 15 def retry? @retry end
If the error can be retried
Source
# File lib/autobuild/exceptions.rb, line 31 def to_s dir = "(#{target.srcdir})" if target.respond_to?(:srcdir) 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
Calls superclass method
Also aliased as: exception_message