com.badlogic.gdx.utils
Class SerializationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.badlogic.gdx.utils.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.

Author:
Nathan Sweet
See Also:
Serialized Form

Constructor Summary
SerializationException()
           
SerializationException(String message)
           
SerializationException(String message, Throwable cause)
           
SerializationException(Throwable cause)
           
 
Method Summary
 void addTrace(String info)
          Adds information to the exception message about where in the the object graph serialization failure occurred.
 boolean causedBy(Class type)
          Returns true if any of the exceptions that caused this exception are of the specified type.
 String getMessage()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SerializationException

public SerializationException()

SerializationException

public SerializationException(String message,
                              Throwable cause)

SerializationException

public SerializationException(String message)

SerializationException

public SerializationException(Throwable cause)
Method Detail

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.



Copyright © 2013. All Rights Reserved.