Class SerializationException

  • All Implemented Interfaces:
    java.io.Serializable

    public class SerializationException
    extends java.lang.RuntimeException
    Indicates an error during serialization due to misconfiguration or during deserialization due to invalid input data.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addTrace​(java.lang.String info)
      Adds information to the exception message about where in the the object graph serialization failure occurred.
      boolean causedBy​(java.lang.Class type)
      Returns true if any of the exceptions that caused this exception are of the specified type.
      java.lang.String getMessage()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SerializationException

        public SerializationException()
      • SerializationException

        public SerializationException​(java.lang.String message,
                                      java.lang.Throwable cause)
      • SerializationException

        public SerializationException​(java.lang.String message)
      • SerializationException

        public SerializationException​(java.lang.Throwable cause)
    • Method Detail

      • causedBy

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

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

        public void addTrace​(java.lang.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.