Package com.apple.foundationdb.map
Class BunchedMapException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.apple.foundationdb.util.LoggableException
-
- com.apple.foundationdb.map.BunchedMapException
-
- All Implemented Interfaces:
LoggableKeysAndValues<LoggableException>
,Serializable
- Direct Known Subclasses:
BunchedSerializationException
@API(EXPERIMENTAL) public class BunchedMapException extends LoggableException
Exception class that can be thrown by aBunchedMap
. Exceptions of this class might be thrown if some internal invariant of theBunchedMap
class has been broken (similar to an assertion error). Errors from serializing or deserializing keys and values should throw aBunchedSerializationException
, which is a subclass of this exception, rather than instances of the base exception.- See Also:
BunchedMap
,BunchedSerializationException
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BunchedMapException(String message)
BunchedMapException(String message, Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BunchedMapException
addLogInfo(Object... keyValue)
Add a list of key/value pairs to the log information.BunchedMapException
addLogInfo(String description, Object object)
Add a key/value pair to the log information.-
Methods inherited from class com.apple.foundationdb.util.LoggableException
exportLogInfo, getLogInfo
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
addLogInfo
@Nonnull public BunchedMapException addLogInfo(@Nonnull String description, Object object)
Description copied from class:LoggableException
Add a key/value pair to the log information. This will use the description given as the key and the object provided as the value.- Specified by:
addLogInfo
in interfaceLoggableKeysAndValues<LoggableException>
- Overrides:
addLogInfo
in classLoggableException
- Parameters:
description
- description of the log info pairobject
- value of the log info pair- Returns:
- this
LoggableException
-
addLogInfo
@Nonnull public BunchedMapException addLogInfo(@Nonnull Object... keyValue)
Description copied from class:LoggableException
Add a list of key/value pairs to the log information. This will treat the list of items as pairs to be added with every even element being a key and every odd element being a value (associated with the even key preceding it). So, for example,["k0", "v0", "k1", "v1"]
will add two pairs to the log info, one with key"k0"
and value"v0"
and one with key"k1"
and value"v1"
. Note that this is the same format that is exported byLoggableException.exportLogInfo()
.- Specified by:
addLogInfo
in interfaceLoggableKeysAndValues<LoggableException>
- Overrides:
addLogInfo
in classLoggableException
- Parameters:
keyValue
- flattened map of key-value pairs- Returns:
- this
LoggableException
-
-