Exception: Mongo::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/mongo/error.rb,
lib/mongo/error/parser.rb,
lib/mongo/error/invalid_uri.rb,
lib/mongo/error/socket_error.rb,
lib/mongo/error/invalid_file.rb,
lib/mongo/error/invalid_nonce.rb,
lib/mongo/error/max_bson_size.rb,
lib/mongo/error/closed_stream.rb,
lib/mongo/error/file_not_found.rb,
lib/mongo/error/invalid_document.rb,
lib/mongo/error/max_message_size.rb,
lib/mongo/error/multi_index_drop.rb,
lib/mongo/error/extra_file_chunk.rb,
lib/mongo/error/bulk_write_error.rb,
lib/mongo/error/invalid_signature.rb,
lib/mongo/error/operation_failure.rb,
lib/mongo/error/missing_file_chunk.rb,
lib/mongo/error/unexpected_response.rb,
lib/mongo/error/need_primary_server.rb,
lib/mongo/error/no_server_available.rb,
lib/mongo/error/unsupported_features.rb,
lib/mongo/error/socket_timeout_error.rb,
lib/mongo/error/invalid_write_concern.rb,
lib/mongo/error/unsupported_collation.rb,
lib/mongo/error/invalid_database_name.rb,
lib/mongo/error/invalid_min_pool_size.rb,
lib/mongo/error/invalid_file_revision.rb,
lib/mongo/error/invalid_bulk_operation.rb,
lib/mongo/error/unexpected_chunk_length.rb,
lib/mongo/error/invalid_collection_name.rb,
lib/mongo/error/invalid_update_document.rb,
lib/mongo/error/invalid_application_name.rb,
lib/mongo/error/invalid_server_preference.rb,
lib/mongo/error/invalid_bulk_operation_type.rb,
lib/mongo/error/invalid_replacement_document.rb,
lib/mongo/error/unchangeable_collection_option.rb

Overview

Base error class for all Mongo related errors.

Since:

  • 2.0.0

Defined Under Namespace

Classes: BulkWriteError, ClosedStream, ExtraFileChunk, FileNotFound, InvalidApplicationName, InvalidBulkOperation, InvalidBulkOperationType, InvalidCollectionName, InvalidDatabaseName, InvalidDocument, InvalidFile, InvalidFileRevision, InvalidMinPoolSize, InvalidNonce, InvalidReplacementDocument, InvalidServerPreference, InvalidSignature, InvalidURI, InvalidUpdateDocument, InvalidWriteConcern, MaxBSONSize, MaxMessageSize, MissingFileChunk, MultiIndexDrop, NeedPrimaryServer, NoServerAvailable, OperationFailure, Parser, SocketError, SocketTimeoutError, UnchangeableCollectionOption, UnexpectedChunkLength, UnexpectedResponse, UnsupportedCollation, UnsupportedFeatures

Constant Summary

CODE =

The error code field.

Since:

  • 2.0.0

'code'.freeze
ERR =

An error field, MongoDB < 2.6

Since:

  • 2.0.0

'$err'.freeze
ERROR =

An error field, MongoDB < 2.4

Since:

  • 2.0.0

'err'.freeze
ERRMSG =

The standard error message field, MongoDB 3.0+

Since:

  • 2.0.0

'errmsg'.freeze
WRITE_ERRORS =

The constant for the writeErrors array.

Since:

  • 2.0.0

'writeErrors'.freeze
WRITE_CONCERN_ERROR =

The constant for a write concern error.

Since:

  • 2.0.0

'writeConcernError'.freeze
WRITE_CONCERN_ERRORS =

The constant for write concern errors.

Since:

  • 2.1.0

'writeConcernErrors'.freeze
UNKNOWN_ERROR =

Constant for an unknown error.

Since:

  • 2.0.0

8.freeze
BAD_VALUE =

Constant for a bad value error.

Since:

  • 2.0.0

2.freeze
CURSOR_NOT_FOUND =

Constant for a Cursor not found error.

Since:

  • 2.2.3

'Cursor not found.'