Package org.apache.flink.util
Class SerializedThrowable
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.apache.flink.util.SerializedThrowable
-
- All Implemented Interfaces:
Serializable
public class SerializedThrowable extends Exception implements Serializable
Utility class for dealing with user-defined Throwable types that are serialized (for example during RPC/Actor communication), but cannot be resolved with the default class loader.This exception mimics the original exception with respect to message and stack trace, and contains the original exception in serialized form. The original exception can be re-obtained by supplying the appropriate class loader.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SerializedThrowable(Throwable exception)Create a new SerializedThrowable.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ThrowabledeserializeError(ClassLoader classloader)static Throwableget(Throwable serThrowable, ClassLoader loader)StringgetFullStringifiedStackTrace()StringgetOriginalErrorClassName()byte[]getSerializedException()voidprintStackTrace(PrintStream s)voidprintStackTrace(PrintWriter s)StringtoString()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
SerializedThrowable
public SerializedThrowable(Throwable exception)
Create a new SerializedThrowable.- Parameters:
exception- The exception to serialize.
-
-
Method Detail
-
deserializeError
public Throwable deserializeError(ClassLoader classloader)
-
getOriginalErrorClassName
public String getOriginalErrorClassName()
-
getSerializedException
public byte[] getSerializedException()
-
getFullStringifiedStackTrace
public String getFullStringifiedStackTrace()
-
printStackTrace
public void printStackTrace(PrintStream s)
- Overrides:
printStackTracein classThrowable
-
printStackTrace
public void printStackTrace(PrintWriter s)
- Overrides:
printStackTracein classThrowable
-
get
public static Throwable get(Throwable serThrowable, ClassLoader loader)
-
-