com.sapportals.portal.prt.runtime
Class PortalRuntimeException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sapportals.portal.prt.runtime.PortalRuntimeException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PortalComponentException, PortalOMException, PortalServiceException, ProfileNotFoundException, ResourceException

public class PortalRuntimeException
extends java.lang.RuntimeException

The Portal Runtime Exception is the base class for all the exceptions raised by the Portal builder Framework. It implements the IPortalException interface providing methods for logging and HTML rendering of the exception.

A Portal Runtime Exception can contain another exception as its original exception.

See Also:
com.sapportals.portal.prt.runtime.IPortalException, PortalComponentException, Serialized Form

Constructor Summary
PortalRuntimeException(java.lang.String s)
          Constructor with a String message.
PortalRuntimeException(java.lang.String s, java.lang.Throwable exception)
          Exception wrapper constructor.
PortalRuntimeException(java.lang.Throwable exception)
          Exception wrapper constructor.
 
Method Summary
 java.lang.Throwable getCause()
          Returns the cause of this exception.
 java.lang.Throwable getException()
          Deprecated. Please use getCause() instead.
 void printStackTrace()
          Prints the stack trace of this exception and any chained exception to System.err
 void printStackTrace(java.io.PrintStream s)
          Prints the stack trace of this exception and any chained exception to the specified print stream.
 void printStackTrace(java.io.PrintWriter s)
          Prints the stack trace of this exception and any chained exception to the specified print writer.
 void setCause(java.lang.Throwable cause)
          Set the cause of this exception.
 void setException(java.lang.Throwable t)
          Deprecated. Please use setCause() instead.
 java.lang.String toHTML()
          Returns the message and the stack of the exception.
 java.lang.String toText()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortalRuntimeException

public PortalRuntimeException(java.lang.String s)
Constructor with a String message.
Parameters:
s - a short description of the exception.

PortalRuntimeException

public PortalRuntimeException(java.lang.Throwable exception)
Exception wrapper constructor.
Parameters:
exception - a Throwable object referring to the original exception.

PortalRuntimeException

public PortalRuntimeException(java.lang.String s,
                              java.lang.Throwable exception)
Exception wrapper constructor.
Parameters:
s - a short String describing the exception
exception - a Throwable object referring to the original exception
Method Detail

getException

public java.lang.Throwable getException()
Deprecated. Please use getCause() instead.

Gets the original exception which can be null.
Returns:
the original exception

setException

public void setException(java.lang.Throwable t)
Deprecated. Please use setCause() instead.

Sets the original exception
Parameters:
t - the orginal exception

setCause

public void setCause(java.lang.Throwable cause)
Set the cause of this exception.
Parameters:
cause - The cause of this exception.

getCause

public java.lang.Throwable getCause()
Returns the cause of this exception.

printStackTrace

public void printStackTrace()
Prints the stack trace of this exception and any chained exception to System.err
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Prints the stack trace of this exception and any chained exception to the specified print writer.
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - PrintWriter to use for output

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Prints the stack trace of this exception and any chained exception to the specified print stream.
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - PrintWriter to use for output

toHTML

public java.lang.String toHTML()
Returns the message and the stack of the exception. The string is intended to be used in an HTML rendering.

toText

public java.lang.String toText()