public final class MongoDbErrorCodes extends Object
MongoDbErrorCodes
holds MongoDB specific error codes outlined in mongo/base/error_codes.err.Constructor and Description |
---|
MongoDbErrorCodes() |
Modifier and Type | Method and Description |
---|---|
static String |
getErrorDescription(Integer errorCode) |
static boolean |
isClientSessionFailureCode(Integer errorCode)
Check if the given error code matches a know session related error.
|
static boolean |
isDataAccessResourceFailureCode(Integer errorCode) |
static boolean |
isDataIntegrityViolationCode(Integer errorCode) |
static boolean |
isDuplicateKeyCode(Integer errorCode) |
static boolean |
isInvalidDataAccessApiUsageCode(Integer errorCode) |
static boolean |
isPermissionDeniedCode(Integer errorCode) |
static boolean |
isTransactionFailureCode(Integer errorCode)
Check if the given error code matches a know transaction related error.
|
public static boolean isDataIntegrityViolationCode(@Nullable Integer errorCode)
public static boolean isDataAccessResourceFailureCode(@Nullable Integer errorCode)
public static boolean isInvalidDataAccessApiUsageCode(@Nullable Integer errorCode)
public static boolean isClientSessionFailureCode(@Nullable Integer errorCode)
errorCode
- the error code to check.Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.