Exception: Autobuild::CompositeException

Inherits:
PhaseException show all
Defined in:
lib/autobuild/exceptions.rb

Overview

The exception type that is used to report multiple errors that occured when ignore_errors is set

Instance Attribute Summary collapse

Attributes inherited from PhaseException

#phase, #target

Instance Method Summary collapse

Methods inherited from PhaseException

#exception_message, #fatal?, #retry?

Constructor Details

#initialize(original_errors) ⇒ CompositeException

Returns a new instance of CompositeException.



154
155
156
157
# File 'lib/autobuild/exceptions.rb', line 154

def initialize(original_errors)
    @original_errors = original_errors
    super()
end

Instance Attribute Details

#original_errorsObject (readonly)

The array of exception objects representing all the errors that occured during the build



152
153
154
# File 'lib/autobuild/exceptions.rb', line 152

def original_errors
  @original_errors
end

Instance Method Details

#mail?Boolean

Returns:

  • (Boolean)


159
160
161
# File 'lib/autobuild/exceptions.rb', line 159

def mail?
    true
end

#to_sObject



163
164
165
166
167
168
169
# File 'lib/autobuild/exceptions.rb', line 163

def to_s
    result = ["#{original_errors.size} errors occured"]
    original_errors.each_with_index do |e, i|
        result << "(#{i}) #{e}"
    end
    result.join("\n")
end