Sha256: 077bab10fc5a159f0857cddfe434096e7a4cd561b84c98cef40752dd6e7be9b9

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

Contents

module S3Website
  class S3WebsiteError < StandardError
  end

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

  class NoPredefinedWebsiteDirectoryFound < NoWebsiteDirectoryFound
    def initialize(message = "I can't find a website in any of the following directories: #{Paths.site_paths.join(', ')}. Please specify the location of the website with the --site option.")
      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

1 entries across 1 versions & 1 rubygems

Version Path
s3_website-0.3.0 lib/s3_website/errors.rb