Class RelationalException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.apple.foundationdb.relational.api.exceptions.RelationalException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
InternalErrorException
,InvalidColumnReferenceException
,InvalidTypeException
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRelationalException
(ErrorCode errorCode, Throwable cause) RelationalException
(String message, ErrorCode errorCode) RelationalException
(String message, ErrorCode errorCode, Throwable cause) RelationalException
(String message, SQLException sqle) -
Method Summary
Modifier and TypeMethodDescriptionaddContext
(String ctxName, Object ctxValue) Add additional context to the Exception.withContext
(Map<String, Object> context) Add additional context to the Exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RelationalException
-
RelationalException
-
RelationalException
-
RelationalException
-
RelationalException
-
-
Method Details
-
toSqlException
-
addContext
Add additional context to the Exception. This method is intended to carry "context" for easy logging purposes, it is not a replacement for proper error codes or for effective error messages. Any information that is held within this context should (within reason) also be contained within either the error message or the ErrorCode fields. This method exists solely for the purposes of carrying a historical error handling logic forward, and should not be relied upon for important information.- Parameters:
ctxName
- the name of the additional context field.ctxValue
- the value of the additional context field.- Returns:
- an exception holding the context.
-
withContext
Add additional context to the Exception. This method is intended to carry "context" for easy logging purposes, it is not a replacement for proper error codes or for effective error messages. Any information that is held within this context should (within reason) also be contained within either the error message or the ErrorCode fields. This method exists solely for the purposes of carrying a historical error handling logic forward, and should not be relied upon for important information.- Parameters:
context
- additional context as a map.- Returns:
- an exception holding the context.
-
toUncheckedWrappedException
-
getErrorCode
-
getContext
-