Sha256: ecb15a96495785d23426f7efcef94a53f6f6980ddcd0c3a86c3bf1958dba6741

Contents?: true

Size: 851 Bytes

Versions: 2

Compression:

Stored size: 851 Bytes

Contents

module Mongrations
  class MongrationError < ::MongoMapper::Error; end

  class IrreversibleMigration < MongrationError#:nodoc:
  end

  class DuplicateMigrationVersionError < MongrationError#:nodoc:
    def initialize(version)
      super("Multiple migrations have the version number #{version}")
    end
  end

  class DuplicateMigrationNameError < MongrationError#:nodoc:
    def initialize(name)
      super("Multiple migrations have the name #{name}")
    end
  end

  class UnknownMigrationVersionError < MongrationError #:nodoc:
    def initialize(version)
      super("No migration with version number #{version}")
    end
  end

  class IllegalMigrationNameError < MongrationError#:nodoc:
    def initialize(name)
      super("Illegal name for migration file: #{name}\n\t(only lower case letters, numbers, and '_' allowed)")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
leifcr-mongrations-0.1.7 lib/mongrations/exceptions.rb
leifcr-mongrations-0.1.6 lib/mongrations/exceptions.rb