Sha256: 70bd43473d0dbef20fcdef718b8dc4d5d0e3f2eb71110f51fe2489506e722668

Contents?: true

Size: 849 Bytes

Versions: 12

Compression:

Stored size: 849 Bytes

Contents

require 'riak/errors/base'

module Riak
  class CrdtError < Error

    class SetRemovalWithoutContextError < CrdtError
      def initialize
        super t('crdt.set_removal_without_context')
      end
    end

    class PreconditionError < CrdtError
      def initialize(message)
        super t('crdt.precondition', message: message)
      end
    end

    class UnrecognizedDataType < CrdtError
      def initialize(given_type)
        super t('crdt.unrecognized_type', type: given_type)
      end
    end

    class UnexpectedDataType < CrdtError
      def initialize(given_type, expected_type)
        super t('crdt.unexpected_type',
                given: given_type,
                expected: expected_type)
      end
    end

    class NotACrdt < CrdtError
      def initialize
        super t('crdt.not_a_crdt')
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
riak-client-2.6.0 lib/riak/errors/crdt_error.rb
riak-client-2.5.0 lib/riak/errors/crdt_error.rb
riak-client-2.4.1 lib/riak/errors/crdt_error.rb
riak-client-2.4.0 lib/riak/errors/crdt_error.rb
riak-client-2.4.0.pre1 lib/riak/errors/crdt_error.rb
riak-client-2.3.2 lib/riak/errors/crdt_error.rb
riak-client-2.3.1 lib/riak/errors/crdt_error.rb
riak-client-2.3.0 lib/riak/errors/crdt_error.rb
riak-client-2.2.2 lib/riak/errors/crdt_error.rb
riak-client-2.2.1 lib/riak/errors/crdt_error.rb
riak-client-noenc-1.0.0 lib/riak/errors/crdt_error.rb
riak-client-2.2.0 lib/riak/errors/crdt_error.rb