lib/berkshelf/errors.rb in berkshelf-2.0.4 vs lib/berkshelf/errors.rb in berkshelf-2.0.5
- old
+ new
@@ -377,6 +377,23 @@
def to_s
"No #{@type.capitalize} config file found at: '#{@path}'!"
end
end
+
+ class LockfileParserError < BerkshelfError
+ status_code(136)
+
+ # @param [String] lockfile
+ # the path to the Lockfile
+ # @param [~Exception] original
+ # the original exception class
+ def initialize(lockfile, original)
+ @lockfile = Pathname.new(lockfile.to_s).basename.to_s
+ @original = original
+ end
+
+ def to_s
+ "Error reading the Berkshelf lockfile `#{@lockfile}` (#{@original.class})"
+ end
+ end
end