Package com.tangosol.io.pof
Class PortableException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.tangosol.io.pof.PortableException
- All Implemented Interfaces:
PortableObject
,SerializationSupport
,Serializable
- Direct Known Subclasses:
RequestIncompleteException
,RequestPolicyException
public class PortableException
extends RuntimeException
implements PortableObject, SerializationSupport
A
PortableException
is an exception that allows information about a remote
exception or error to be serialized and deserialized to/from a POF
stream.- Author:
- jh,mf 2006.08.04
- See Also:
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Default constructor.protected
PortableException
(String sMessage) Constructs aPortableException
with the specified detail message.protected
PortableException
(String sMessage, Throwable e) Construct aPortableException
from aThrowable
object and an additional description.protected
Construct aPortableException
from aThrowable
object. -
Method Summary
Modifier and TypeMethodDescriptionString[]
Return an array of Strings containing the full representation of the stack trace.Return the detail message string of this PortableException.getName()
Return the name of the exception.void
printStackTrace
(PrintStream stream) Print thisPortableException
and its stack trace to the specified stream.void
printStackTrace
(PrintWriter writer) Print thisPortableException
and its stack trace to the specified writer.void
Restore the contents of a user type instance by reading its state using the specified PofReader object.Returns the original type, iff the type is a subclass ofPortableException
, during deserialization opposed to a newPortableException
with the metadata of the original exception.toString()
Return a human-readable description for this exception.void
writeExternal
(PofWriter out) Save the contents of a POF user type instance by writing its state using the specified PofWriter object.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.tangosol.io.SerializationSupport
writeReplace
-
Field Details
-
m_sName
The exception's name. -
m_sMessage
The exception's message. -
m_asStackRemote
A raw representation of the remote stack trace for this exception.
-
-
Constructor Details
-
PortableException
protected PortableException()Default constructor. -
PortableException
Constructs aPortableException
with the specified detail message.- Parameters:
sMessage
- the String that contains a detailed message
-
PortableException
Construct aPortableException
from aThrowable
object.- Parameters:
e
- theThrowable
object
-
PortableException
Construct aPortableException
from aThrowable
object and an additional description.- Parameters:
sMessage
- the additional descriptione
- theThrowable
object
-
-
Method Details
-
readResolve
Returns the original type, iff the type is a subclass ofPortableException
, during deserialization opposed to a newPortableException
with the metadata of the original exception.- Specified by:
readResolve
in interfaceSerializationSupport
- Returns:
- a reconstructed
PortableException
subclass, if possible, otherwise returns the current instance - Throws:
ObjectStreamException
- if an error occurs
-
getName
Return the name of the exception.- Returns:
- the name of the exception
-
getFullStackTrace
Return an array of Strings containing the full representation of the stack trace. The first element of the stack represents the exception's point of origin.- Returns:
- the full stack trace
-
readExternal
Description copied from interface:PortableObject
Restore the contents of a user type instance by reading its state using the specified PofReader object.- Specified by:
readExternal
in interfacePortableObject
- Parameters:
in
- the PofReader from which to read the object's state- Throws:
IOException
- if an I/O error occurs
-
writeExternal
Description copied from interface:PortableObject
Save the contents of a POF user type instance by writing its state using the specified PofWriter object.- Specified by:
writeExternal
in interfacePortableObject
- Parameters:
out
- the PofWriter to which to write the object's state- Throws:
IOException
- if an I/O error occurs
-
getMessage
Return the detail message string of this PortableException.- Overrides:
getMessage
in classThrowable
- Returns:
- the detail message string (may be
null
)
-
printStackTrace
Print thisPortableException
and its stack trace to the specified stream.- Overrides:
printStackTrace
in classThrowable
- Parameters:
stream
- thePrintStream
to use for the output
-
printStackTrace
Print thisPortableException
and its stack trace to the specified writer.- Overrides:
printStackTrace
in classThrowable
- Parameters:
writer
- thePrintWriter
to use for the output
-
toString
Return a human-readable description for this exception.
-