Exception: FrameworkValidationError

Inherits:
AppError
  • Object
show all
Defined in:
lib/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ FrameworkValidationError

Returns a new instance of FrameworkValidationError.



49
50
51
# File 'lib/errors.rb', line 49

def initialize(errors)
  @errors = errors
end

Instance Method Details

#to_sObject



53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/errors.rb', line 53

def to_s
  header = ["Framework", CARTHAGE_BUILD_DIR, CARTFILE_RESOLVED]
  rows = @errors.map { |e| [e.framework_name, e.build_version, e.cartfile_resolved_version] }
  table = Table.new(header, rows)
  <<~EOS
    Detected differences between existing frameworks in '#{CARTHAGE_BUILD_DIR}' and entries in '#{CARTFILE_RESOLVED}':

    #{table}

    To resolve the issue:
    - run `carthagerc download` to fetch missing frameworks from the server.
    - if the issue persists, run `carthage bootstrap` to build frameworks and `carthagerc upload` to populate the server.
  EOS
end