Sha256: 59598d79e5dd0e24fb8bcc1cdf5255626ba4131f5ce94627a3d49c862c92f793

Contents?: true

Size: 864 Bytes

Versions: 3

Compression:

Stored size: 864 Bytes

Contents

module S3Website
  class S3WebsiteError < StandardError
  end

  class NotAJekyllProjectError < S3WebsiteError
    def initialize(message = "I can't find any directory called _site. Are you in the right directory?")
      super(message)
    end
  end

  class NoConfigurationFileError < S3WebsiteError
    def initialize(message = "I've just generated a file called s3_website.yml. Go put your details in it!")
      super(message)
    end
  end

  class MalformedConfigurationFileError < S3WebsiteError
    def initialize(message = "I can't parse the file s3_website.yml. It should look like this:\n#{ConfigLoader::CONFIGURATION_FILE_TEMPLATE}")
      super(message)
    end
  end

  class RetryAttemptsExhaustedError < S3WebsiteError
    def initialize(message = "Operation failed even though we tried to recover from it")
      super(message)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
s3_website-0.2.1 lib/s3_website/errors.rb
s3_website-0.2.0 lib/s3_website/errors.rb
s3_website-0.1.0 lib/s3_website/errors.rb