Class BunchedSerializationException

    • Constructor Detail

      • BunchedSerializationException

        public BunchedSerializationException​(@Nonnull
                                             String message)
    • 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 be null 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
      • getValue

        @Nullable
        public Object getValue()
        Return the value that triggered this exception if set. This will be null 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