Class 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 Details

    • m_sName

      protected String m_sName
      The exception's name.
    • m_sMessage

      protected String m_sMessage
      The exception's message.
    • m_asStackRemote

      protected String[] m_asStackRemote
      A raw representation of the remote stack trace for this exception.
  • Constructor Details

    • PortableException

      protected PortableException()
      Default constructor.
    • PortableException

      protected PortableException(String sMessage)
      Constructs a PortableException with the specified detail message.
      Parameters:
      sMessage - the String that contains a detailed message
    • PortableException

      protected PortableException(Throwable e)
      Construct a PortableException from a Throwable object.
      Parameters:
      e - the Throwable object
    • PortableException

      protected PortableException(String sMessage, Throwable e)
      Construct a PortableException from a Throwable object and an additional description.
      Parameters:
      sMessage - the additional description
      e - the Throwable object
  • Method Details

    • readResolve

      public Object readResolve() throws ObjectStreamException
      Returns the original type, iff the type is a subclass of PortableException, during deserialization opposed to a new PortableException with the metadata of the original exception.
      Specified by:
      readResolve in interface SerializationSupport
      Returns:
      a reconstructed PortableException subclass, if possible, otherwise returns the current instance
      Throws:
      ObjectStreamException - if an error occurs
    • getName

      public String getName()
      Return the name of the exception.
      Returns:
      the name of the exception
    • getFullStackTrace

      public String[] 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

      public void readExternal(PofReader in) throws IOException
      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 interface PortableObject
      Parameters:
      in - the PofReader from which to read the object's state
      Throws:
      IOException - if an I/O error occurs
    • writeExternal

      public void writeExternal(PofWriter out) throws IOException
      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 interface PortableObject
      Parameters:
      out - the PofWriter to which to write the object's state
      Throws:
      IOException - if an I/O error occurs
    • getMessage

      public String getMessage()
      Return the detail message string of this PortableException.
      Overrides:
      getMessage in class Throwable
      Returns:
      the detail message string (may be null)
    • printStackTrace

      public void printStackTrace(PrintStream stream)
      Print this PortableException and its stack trace to the specified stream.
      Overrides:
      printStackTrace in class Throwable
      Parameters:
      stream - the PrintStream to use for the output
    • printStackTrace

      public void printStackTrace(PrintWriter writer)
      Print this PortableException and its stack trace to the specified writer.
      Overrides:
      printStackTrace in class Throwable
      Parameters:
      writer - the PrintWriter to use for the output
    • toString

      public String toString()
      Return a human-readable description for this exception.
      Overrides:
      toString in class Throwable
      Returns:
      a String description of the PortableException