lib/errors.rb in carthage_remote_cache-0.0.9 vs lib/errors.rb in carthage_remote_cache-0.0.10
- old
+ new
@@ -49,11 +49,11 @@
def initialize(errors)
@errors = errors
end
def to_s
- header = ['Framework', CARTHAGE_BUILD_DIR, CARTFILE_RESOLVED]
+ 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}':
@@ -67,5 +67,16 @@
end
class MissingFrameworkDirectoryError < AppError; end
class ServerVersionMismatchError < AppError; end
+
+class PlatformMismatchError < AppError
+ def initialize(platform)
+ @platform = platform
+ end
+
+ def to_s
+ platforms = PLATFORMS.map(&:to_s).join(", ")
+ "Platform '#{@platform}' doesn't match any of: #{platforms}"
+ end
+end