Sha256: dc1443f2c5aff7a51de73292b20b05ae26e767c1c2bc22bb07844ed9a76de234

Contents?: true

Size: 850 Bytes

Versions: 19

Compression:

Stored size: 850 Bytes

Contents

# encoding: utf-8
module Mongoid #:nodoc
  module Errors #:nodoc

    class ClassAlreadyDefined < RuntimeError
      def initialize(klass)
        @klass = klass
      end
      def message
        "#{@klass} already defined, can't aggregate!"
      end
    end

    class AggregationAlreadyDefined < RuntimeError
      def initialize(klass, token)
        @klass = klass
        @token = token
      end
      def message
        "Aggregation '#{@token}' already defined for model #{@klass}"
      end
    end

    class AggregationNameDeprecated < RuntimeError
      def initialize(token)
        @token = token
      end
      def message
        "Ussing aggregation name '#{@klass}' is deprecated. Please select another name."
      end
    end

    class ModelNotSaved < RuntimeError; end

    class NotMongoid < RuntimeError; end
    
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
gatoroid-0.2.17 lib/gator/errors.rb
gatoroid-0.2.16 lib/gator/errors.rb
gatoroid-0.2.15 lib/gator/errors.rb
gatoroid-0.2.14 lib/gator/errors.rb
gatoroid-0.2.13 lib/gator/errors.rb
gatoroid-0.2.12 lib/gator/errors.rb
gatoroid-0.2.11 lib/gator/errors.rb
gatoroid-0.2.10 lib/gator/errors.rb
gatoroid-0.2.9 lib/gator/errors.rb
gatoroid-0.2.8 lib/gator/errors.rb
gatoroid-0.2.7 lib/gator/errors.rb
gatoroid-0.2.6 lib/gator/errors.rb
gatoroid-0.2.5 lib/gator/errors.rb
gatoroid-0.2.4 lib/gator/errors.rb
gatoroid-0.2.3 lib/gator/errors.rb
gatoroid-0.2.2 lib/gator/errors.rb
gatoroid-0.2.1 lib/gator/errors.rb
gatoroid-0.2.0 lib/gator/errors.rb
gatoroid-0.1.0 lib/gator/errors.rb