Class MongoServerError

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AbstractMongoCollection.FindAndModifyPlanExecutorError, BadValueException, CannotTraverseElementException, ConflictingUpdateOperatorsException, ConversionFailureException, CursorNotFoundException, DollarPrefixedFieldNameException, FailedToOptimizePipelineError, FailedToParseException, IllegalOperationException, ImmutableFieldException, IndexBuildFailedException, IndexKeySpecsConflictException, IndexNotFoundException, InvalidIdFieldError, InvalidNamespaceError, InvalidOptionsException, KeyConstraintError, MergeStageNoMatchingDocumentException, NamespaceExistsException, NoReplicationEnabledException, NoSuchCommandException, PathNotViableException, ProjectStage.InvalidProjectException, TypeMismatchException

public class MongoServerError extends MongoServerException
See Also:
  • Constructor Details

    • MongoServerError

      public MongoServerError(int errorCode, String message)
    • MongoServerError

      public MongoServerError(ErrorCode errorCode, String message)
    • MongoServerError

      public MongoServerError(int errorCode, String codeName, String message)
    • MongoServerError

      public MongoServerError(int errorCode, String codeName, String message, Throwable cause)
  • Method Details

    • getCode

      public int getCode()
    • getCodeName

      public String getCodeName()
    • getMessageWithoutErrorCode

      public String getMessageWithoutErrorCode()
      Overrides:
      getMessageWithoutErrorCode in class MongoServerException
    • shouldPrefixCommandContext

      public boolean shouldPrefixCommandContext()
    • hasCode

      public boolean hasCode(ErrorCode... errorCodes)