public class MongoException extends RuntimeException
| Constructor and Description |
|---|
MongoException(int code,
String msg) |
MongoException(int code,
String msg,
Throwable t) |
MongoException(String msg) |
MongoException(String msg,
Throwable t) |
| Modifier and Type | Method and Description |
|---|---|
static MongoException |
fromThrowable(Throwable t)
Static helper to create or cast a MongoException from a throwable
|
int |
getCode()
Gets the exception code
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic MongoException(String msg)
msg - the messagepublic MongoException(int code,
String msg)
code - the error codemsg - the messagepublic MongoException(String msg, Throwable t)
msg - the messaget - the throwable causepublic static MongoException fromThrowable(Throwable t)
t - a throwablepublic int getCode()