Sha256: 61c70d0771d4a6115c507bbe0b9b1712db08274b95a58f0f5686c1f26a4fafd2

Contents?: true

Size: 815 Bytes

Versions: 6

Compression:

Stored size: 815 Bytes

Contents

module Berkshelf
  class BerkshelfError < StandardError
    class << self
      def status_code(code)
        define_method(:status_code) { code }
        define_singleton_method(:status_code) { code }
      end
    end
  end

  class BerksfileNotFound < BerkshelfError; status_code(100); end
  class NoVersionForConstraints < BerkshelfError; status_code(101); end
  class DownloadFailure < BerkshelfError; status_code(102); end
  class CookbookNotFound < BerkshelfError; status_code(103); end
  class GitError < BerkshelfError; status_code(104); end
  class DuplicateSourceDefined < BerkshelfError; status_code(105); end
  class NoSolution < BerkshelfError; status_code(106); end
  class CookbookSyntaxError < BerkshelfError; status_code(107); end
  class UploadFailure < BerkshelfError; status_code(108); end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
berkshelf-0.2.0 lib/berkshelf/errors.rb
berkshelf-0.1.5 lib/berkshelf/errors.rb
berkshelf-0.1.4 lib/berkshelf/errors.rb
berkshelf-0.1.3 lib/berkshelf/errors.rb
berkshelf-0.1.2 lib/berkshelf/errors.rb
berkshelf-0.1.1 lib/berkshelf/errors.rb