com.sapportals.portal.prt.runtime

Class PortalRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.sapportals.portal.prt.runtime.PortalRuntimeException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
HookException, PortalComponentException, PortalLoadException, PortalOMException, PortalServiceException, ProfileNotFoundException, ResourceException

public class PortalRuntimeException
extends 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(String s)
          Constructor with a String message.
PortalRuntimeException(String s, Throwable exception)
          Exception wrapper constructor.
PortalRuntimeException(Throwable exception)
          Exception wrapper constructor.
 
Method Summary
 Throwable getCause()
          Returns the cause of this exception.
 Throwable getException()
          Deprecated. Please use getCause() instead.
static void printCausedBy(boolean printcause)
           
 void printStackTrace()
          Prints the stack trace of this exception and any chained exception to System.err
 void printStackTrace(PrintStream s)
          Prints the stack trace of this exception and any chained exception to the specified print stream.
 void printStackTrace(PrintWriter s)
          Prints the stack trace of this exception and any chained exception to the specified print writer.
 void setCause(Throwable cause)
          Set the cause of this exception.
 void setException(Throwable t)
          Deprecated. Please use setCause() instead.
 String toHTML()
          Returns the message and the stack of the exception.
 String toText()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortalRuntimeException

public PortalRuntimeException(String s)
Constructor with a String message.

Parameters:
s - a short description of the exception.

PortalRuntimeException

public PortalRuntimeException(Throwable exception)
Exception wrapper constructor.

Parameters:
exception - a Throwable object referring to the original exception.

PortalRuntimeException

public PortalRuntimeException(String s,
                              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 Throwable getException()
Deprecated. Please use getCause() instead.

Gets the original exception which can be null.

Returns:
the original exception

setException

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

Sets the original exception

Parameters:
t - the orginal exception

setCause

public void setCause(Throwable cause)
Set the cause of this exception.

Parameters:
cause - The cause of this exception.

getCause

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

Overrides:
getCause in class Throwable

printStackTrace

public void printStackTrace()
Prints the stack trace of this exception and any chained exception to System.err

Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace(PrintWriter s)
Prints the stack trace of this exception and any chained exception to the specified print writer.

Overrides:
printStackTrace in class Throwable
Parameters:
s - PrintWriter to use for output

printStackTrace

public void printStackTrace(PrintStream s)
Prints the stack trace of this exception and any chained exception to the specified print stream.

Overrides:
printStackTrace in class Throwable
Parameters:
s - PrintWriter to use for output

toHTML

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


toText

public String toText()

printCausedBy

public static void printCausedBy(boolean printcause)
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] epbc.prtapi._apideprecated default EP-PIN-PRT
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/api api EP-PIN
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/lib/api api EP-PIN


Copyright 2011 SAP AG Complete Copyright Notice