Exception: Mongo::Error::UnsupportedArrayFilters

Inherits:
Mongo::Error
  • Object
show all
Defined in:
lib/mongo/error/unsupported_array_filters.rb

Overview

Raised if the array filters option is specified for an operation but the server selected does not support array filters.

Since:

  • 2.5.0

Constant Summary collapse

DEFAULT_MESSAGE =

The default error message describing that array filters are not supported.

Returns:

  • (String)

    A default message describing that array filters are not supported by the server.

Since:

  • 2.5.0

"The array_filters option is not a supported feature of the server handling this operation. " +
"Operation results may be unexpected.".freeze
UNACKNOWLEDGED_WRITES_MESSAGE =

The error message describing that array filters cannot be used when write concern is unacknowledged.

Returns:

  • (String)

    A message describing that array filters cannot be used when write concern is unacknowledged.

Since:

  • 2.5.0

"The array_filters option cannot be specified when using unacknowledged writes. " +
"Either remove the array_filters option or use acknowledged writes (w >= 1).".freeze

Constants inherited from Mongo::Error

BAD_VALUE, CODE, CURSOR_NOT_FOUND, ERR, ERRMSG, ERROR, TRANSIENT_TRANSACTION_ERROR_LABEL, UNKNOWN_ERROR, UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL, WRITE_CONCERN_ERROR, WRITE_CONCERN_ERRORS, WRITE_ERRORS

Instance Method Summary collapse

Methods inherited from Mongo::Error

#change_stream_resumable?, #label?

Constructor Details

#initialize(message = nil) ⇒ UnsupportedArrayFilters

Create the new exception.

Examples:

Create the new exception.

Mongo::Error::UnsupportedArrayFilters.new

Since:

  • 2.5.0



46
47
48
# File 'lib/mongo/error/unsupported_array_filters.rb', line 46

def initialize(message = nil)
  super(message || DEFAULT_MESSAGE)
end