Sha256: 84da8e90458bd77781f1603ed6ae32dd8623d5f1fc610033e1e6511bc45c243a

Contents?: true

Size: 589 Bytes

Versions: 12

Compression:

Stored size: 589 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)
        @token = token
      end
      def message
        "Aggregation '#{@token}' already defined for model #{klass}"
      end
    end

    class ModelNotSaved < RuntimeError; end

    class NotMongoid < RuntimeError; end
    
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
trackoid-0.2.0 lib/trackoid/errors.rb
trackoid-0.1.12 lib/trackoid/errors.rb
trackoid-0.1.11 lib/trackoid/errors.rb
trackoid-0.1.10 lib/trackoid/errors.rb
trackoid-0.1.9 lib/trackoid/errors.rb
trackoid-0.1.8 lib/trackoid/errors.rb
trackoid-0.1.7 lib/trackoid/errors.rb
trackoid-0.1.6 lib/trackoid/errors.rb
trackoid-0.1.5 lib/trackoid/errors.rb
trackoid-0.1.4 lib/trackoid/errors.rb
trackoid-0.1.3 lib/trackoid/errors.rb
trackoid-0.1.2 lib/trackoid/errors.rb