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
@API(EXPERIMENTAL) public class BunchedSerializationException extends BunchedMapException
Exception that can be thrown from aBunchedSerializer
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BunchedSerializationException(String message)
BunchedSerializationException(String message, Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getData()
Return the raw bytes that triggered this exception.Object
getValue()
Return the value that triggered this exception if set.BunchedSerializationException
setData(byte[] data)
Set the data array that triggered this exception.BunchedSerializationException
setValue(Object value)
Set the value that triggered this exception.-
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
-
-
-
-
Method Detail
-
setData
@Nonnull public BunchedSerializationException setData(@Nonnull byte[] data)
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
@Nonnull public BunchedSerializationException setValue(@Nonnull Object value)
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
-
-