123456789_123456789_123456789_123456789_123456789_

Exception: Mongo::Error::UnsupportedArrayFilters Deprecated

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, UnsupportedOption, ::Mongo::Error, StandardError
Instance Chain:
Inherits: Mongo::Error::UnsupportedOption
Defined in: lib/mongo/error/unsupported_array_filters.rb

Overview

Deprecated.

RUBY-2260 In driver version 3.0, this error class will be replaced with UnsupportedOption. To handle this error, catch Mongo::Error::UnsupportedOption, which will prevent any breaking changes in your application when upgrading to version 3.0 of the driver.

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

  • 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

    # File 'lib/mongo/error/unsupported_array_filters.rb', line 37
    "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

    # File 'lib/mongo/error/unsupported_array_filters.rb', line 45
    "The array_filters option cannot be specified when using unacknowledged writes. " +
    "Either remove the array_filters option or use acknowledged writes (w >= 1).".freeze

::Mongo::Error - Inherited

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

UnsupportedOption - Inherited

ALLOW_DISK_USE_MESSAGE, COMMIT_QUORUM_MESSAGE, HINT_MESSAGE, UNACKNOWLEDGED_HINT_MESSAGE

Class Method Summary

UnsupportedOption - Inherited

.allow_disk_use_error

Raise an error about an unsupported allow_disk_use option.

.commit_quorum_error

Raise an error about an unsupported commit_quorum option.

.hint_error

Raise an error about an unsupported hint option.

::Mongo::Error - Inherited

Instance Attribute Summary

::Mongo::Error - Inherited

#change_stream_resumable?

Can the change stream on which this error occurred be resumed, provided the operation that triggered this error was a getMore?

#network_error?

ChangeStreamResumable - Included

#change_stream_resumable?

Can the change stream on which this error occurred be resumed, provided the operation that triggered this error was a getMore?

WriteRetryable - Included

Notable - Included

#connection_global_id

Returns global id of the connection on which the error occurred.

#generation

Returns connection pool generation for the connection on which the error occurred.

#service_id

Returns service id for the connection on which the error occurred.

Instance Method Summary

::Mongo::Error - Inherited

#write_concern_error_label?

Does the write concern error have the given label?

#write_concern_error_labels

The set of error labels associated with the write concern error.

Labelable - Included

#add_label

Adds the specified label to the error instance, if the label is not already in the set of labels.

#label?

Does the error have the given label?

#labels

Gets the set of labels associated with the error.

Notable - Included

#add_note,
#add_notes

Allows multiple notes to be added in a single call, for convenience.

#notes

Returns an array of strings with additional information about the exception.

#to_s, #notes_tail

Constructor Details

.new(message = nil) ⇒ UnsupportedArrayFilters

Create the new exception.

Examples:

Create the new exception.

Mongo::Error::UnsupportedArrayFilters.new

Since:

  • 2.5.0

[ GitHub ]

  
# File 'lib/mongo/error/unsupported_array_filters.rb', line 54

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