lib/berkshelf/errors.rb in berkshelf-0.4.0 vs lib/berkshelf/errors.rb in berkshelf-0.5.0.rc1
- old
+ new
@@ -10,10 +10,11 @@
alias_method :message, :to_s
end
class InternalError < BerkshelfError; status_code(99); end
+ class ArgumentError < InternalError; end
class AbstractFunction < InternalError
def to_s
"Function must be implemented on includer"
end
end
@@ -72,9 +73,11 @@
end
status_code(113)
def status_code
- @original_error ? @original_error.status_code : 113
+ @original_error.respond_to?(:status_code) ? @original_error.status_code : 113
end
end
+
+ class AmbiguousCookbookName < BerkshelfError; status_code(114); end
end