Sha256: 69712e38e97e9ffad3f8e3aca2127998e132cddb3eff498f2d6fc99aa2c31e6f

Contents?: true

Size: 1.1 KB

Versions: 2

Compression:

Stored size: 1.1 KB

Contents

module Zonesync
  class ConflictError < StandardError
    def initialize existing, new
      @existing = existing
      @new = new
    end

    def message
      <<~MSG
        The following untracked DNS record already exists and would be overwritten.
          existing: #{@existing}
          new:      #{@new}
      MSG
    end
  end

  class MissingManifestError < StandardError
    def initialize manifest
      @manifest = manifest
    end

    def message
      <<~MSG
        The zonesync_manifest TXT record is missing. If this is the very first sync, make sure the Zonefile matches what's on the DNS server exactly. Otherwise, someone else may have removed it.
          manifest: #{@manifest}
      MSG
    end
  end

  class ChecksumMismatchError < StandardError
    def initialize existing, new
      @existing = existing
      @new = new
    end

    def message
      <<~MSG
        The zonesync_checksum TXT record does not match the current state of the DNS records. This probably means that someone else has changed them.
          existing: #{@existing}
          new:      #{@new}
      MSG
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
zonesync-0.9.0 lib/zonesync/errors.rb
zonesync-0.8.0 lib/zonesync/errors.rb