Class SerializationException

All Implemented Interfaces:
Serializable

public class SerializationException extends RuntimeException
Indicates an error during serialization due to misconfiguration or during deserialization due to invalid input data.
See Also:
  • Constructor Details

    • SerializationException

      public SerializationException()
    • SerializationException

      public SerializationException(String message, Throwable cause)
    • SerializationException

      public SerializationException(String message)
    • SerializationException

      public SerializationException(Throwable cause)
  • Method Details

    • causedBy

      public boolean causedBy(Class type)
      Returns true if any of the exceptions that caused this exception are of the specified type.
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • addTrace

      public void addTrace(String info)
      Adds information to the exception message about where in the the object graph serialization failure occurred. Serializers can catch SerializationException, add trace information, and rethrow the exception.