Sha256: eab07b729899e9c511da56511f10209e2965476b17a2868161117f07314f15f5

Contents?: true

Size: 883 Bytes

Versions: 4

Compression:

Stored size: 883 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
  class KnifeConfigNotFound < BerkshelfError; status_code(109); end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
berkshelf-0.3.3 lib/berkshelf/errors.rb
berkshelf-0.3.2 lib/berkshelf/errors.rb
berkshelf-0.3.1 lib/berkshelf/errors.rb
berkshelf-0.3.0 lib/berkshelf/errors.rb