Exception: Mongo::Error::UnsupportedCollation

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

Overview

Raised if a collation is specified for an operation but the server selected does not support collations.

Since:

  • 2.4.0

Constant Summary

DEFAULT_MESSAGE =

The default error message describing that collations is not supported.

Returns:

  • (String)

    A default message describing that collations is not supported by the server.

Since:

  • 2.4.0

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

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

Returns:

  • (String)

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

Since:

  • 2.4.0

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

Constants inherited from Mongo::Error

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

Instance Method Summary collapse

Constructor Details

#initialize(message = nil) ⇒ UnsupportedCollation

Create the new exception.

Examples:

Create the new exception.

Mongo::Error::UnsupportedCollation.new

Since:

  • 2.4.0



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

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