Package com.apple.foundationdb.map
Class BunchedSerializationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.apple.foundationdb.util.LoggableException
com.apple.foundationdb.map.BunchedMapException
com.apple.foundationdb.map.BunchedSerializationException
- All Implemented Interfaces:
LoggableKeysAndValues<LoggableException>
,Serializable
Exception that can be thrown from a
BunchedSerializer
while serializing
or deserializing an element. It attempts to include information along
with the exception such as what inputs into the serializer caused the exception
to be thrown.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBunchedSerializationException
(String message) Create a new exception with a static message.BunchedSerializationException
(String message, Throwable cause) Create a new exception with a static message and cause. -
Method Summary
Methods inherited from class com.apple.foundationdb.map.BunchedMapException
addLogInfo, addLogInfo
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
-
Constructor Details
-
BunchedSerializationException
Create a new exception with a static message.- Parameters:
message
- error message
-
BunchedSerializationException
Create a new exception with a static message and cause.- Parameters:
message
- error messagecause
- cause
-
-
Method Details
-
setData
Set the data array that triggered this exception. This should be set if the error occurs while deserializing an array in order to preserve the array for diagnostic purposes.- Parameters:
data
- raw data array that triggered this exception- Returns:
- this
BunchedSerializationException
-
getData
@Nullable public byte[] getData()Return the raw bytes that triggered this exception. This will benull
if the exception was not triggered while deserializing.- Returns:
- the data array that triggered the exception
-
setValue
Set the value that triggered this exception. This should be set if the error occurs while serializing an object to bytes. It should contain the item which triggered the error.- Parameters:
value
- the value that triggered the exception- Returns:
- this
BunchedSerializationException
-
getValue
Return the value that triggered this exception if set. This will benull
if the exception was not triggered while serializing or if more than one value might have caused the error.- Returns:
- the value that triggered the exception
-