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.



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

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



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

def original_errors
  @original_errors
end

Instance Method Details

#mail?Boolean

Returns:

  • (Boolean)


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

def mail?
    true
end

#to_sObject



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

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