com.sap.caf.rt.exception

Class CAFBaseRuntimeException

java.lang.Object
  extended by BaseRuntimeException
      extended by com.sap.caf.rt.exception.CAFBaseRuntimeException
Direct Known Subclasses:
CAFIllegalStateException, CAFMissingMandatoryValueException, CAFUnsupportedOperationException, CAFValueTooLongException

public class CAFBaseRuntimeException
extends BaseRuntimeException

This is the superclass of all unchecked CAF exceptions.


Constructor Summary
CAFBaseRuntimeException()
          Deprecated. Use CAFBaseRuntimeException(Location) instead.
CAFBaseRuntimeException(BaseExceptionInfo baseExcInfo, boolean isRealCause)
          Constructs a new CAFBaseRuntimeException.
CAFBaseRuntimeException(Category category, int severity, Location location, ResourceAccessor ra, String key, Object[] args, Throwable cause)
          Deprecated.  
CAFBaseRuntimeException(Category category, int severity, Location location, ResourceAccessor ra, String key, Object[] args, Throwable cause, boolean isRealCause)
          Deprecated.  
CAFBaseRuntimeException(Location location)
          Constructs a new CAFBaseRuntimeException.
CAFBaseRuntimeException(Location location, ResourceAccessor ra, String key)
          Constructs a new CAFBaseRuntimeException.
CAFBaseRuntimeException(Location location, ResourceAccessor ra, String key, Object[] args)
          Constructs a new CAFBaseRuntimeException.
CAFBaseRuntimeException(Location location, ResourceAccessor ra, String key, Object[] args, Throwable cause)
          Constructs a new CAFBaseRuntimeException.
CAFBaseRuntimeException(Location location, ResourceAccessor ra, String key, Object[] args, Throwable cause, boolean isRealCause)
          Constructs a new CAFBaseRuntimeException.
CAFBaseRuntimeException(Location location, ResourceAccessor ra, String key, Throwable cause)
          Constructs a new CAFBaseRuntimeException.
CAFBaseRuntimeException(Location location, ResourceAccessor ra, String key, Throwable cause, boolean isRealCause)
          Constructs a new CAFBaseRuntimeException.
CAFBaseRuntimeException(Location location, Throwable cause)
          Constructs a new CAFBaseRuntimeException.
CAFBaseRuntimeException(Location location, Throwable cause, boolean isRealCause)
          Constructs a new CAFBaseRuntimeException.
CAFBaseRuntimeException(ResourceAccessor ra, String key)
          Deprecated. Use CAFBaseRuntimeException(Location, ResourceAccessor, String) instead.
CAFBaseRuntimeException(ResourceAccessor ra, String key, Object[] args)
          Deprecated. Use CAFBaseRuntimeException(Location, ResourceAccessor, String, Object[]) instead.
CAFBaseRuntimeException(ResourceAccessor ra, String key, Object[] args, Throwable cause)
          Deprecated. Use CAFBaseRuntimeException(Location, ResourceAccessor, String, Object[], Throwable) instead.
CAFBaseRuntimeException(ResourceAccessor ra, String key, Object[] args, Throwable cause, boolean isRealCause)
          Deprecated. Use CAFBaseRuntimeException(Location, ResourceAccessor, String, Object[], Throwable, boolean) instead.
CAFBaseRuntimeException(ResourceAccessor ra, String key, Throwable cause)
          Deprecated. Use CAFBaseRuntimeException(Location, ResourceAccessor, String, Throwable) instead.
CAFBaseRuntimeException(ResourceAccessor ra, String key, Throwable cause, boolean isRealCause)
          Deprecated. Use CAFBaseRuntimeException(Location, ResourceAccessor, String, Throwable, boolean) instead.
CAFBaseRuntimeException(String key, Object[] args)
          Deprecated. Use CAFBaseRuntimeException#CAFBaseRuntimeException(Location, String, Object[]) instead.
CAFBaseRuntimeException(String key, Object[] args, Throwable cause)
          Deprecated. Use CAFBaseRuntimeException#CAFBaseRuntimeException(Location, String, Object[], Throwable) instead.
CAFBaseRuntimeException(String key, Object[] args, Throwable cause, boolean isRealCause)
          Deprecated. Use CAFBaseRuntimeException#CAFBaseRuntimeException(Location, String, Object[], Throwable, boolean) instead.
 
Method Summary
 String getLocalizedMessage()
          Returns the localized message of the real cause.
 String getLocalizedMessage(Locale locale)
          Returns the localized message of the real cause.
 String getLocalizedMessage(Locale locale, TimeZone timeZone)
          Returns the localized message of the real cause.
 String getLocalizedMessage(TimeZone timeZone)
          Returns the localized message of the real cause.
 String getMessage()
          Returns the message of the real cause.
 Throwable getRealCause()
          Returns the real cause of this exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CAFBaseRuntimeException

public CAFBaseRuntimeException(Location location)
Constructs a new CAFBaseRuntimeException.

Parameters:
location - logging location

CAFBaseRuntimeException

public CAFBaseRuntimeException()
Deprecated. Use CAFBaseRuntimeException(Location) instead.

Constructs a new CAFBaseRuntimeException.


CAFBaseRuntimeException

public CAFBaseRuntimeException(BaseExceptionInfo baseExcInfo,
                               boolean isRealCause)
Constructs a new CAFBaseRuntimeException.

Parameters:
baseExcInfo - information about the throwable which caused this exception
isRealCause - true if the currently constructed exception is the real exception and not just a wrapper, false if cause is the real one

CAFBaseRuntimeException

public CAFBaseRuntimeException(Location location,
                               Throwable cause)
Constructs a new CAFBaseRuntimeException.

Parameters:
location - logging location
cause - the throwable which caused this exception

CAFBaseRuntimeException

public CAFBaseRuntimeException(Location location,
                               Throwable cause,
                               boolean isRealCause)
Constructs a new CAFBaseRuntimeException.

Parameters:
location - logging location
cause - the throwable which caused this exception
isRealCause - true if the currently constructed exception is the real exception and not just a wrapper, false if cause is the real one

CAFBaseRuntimeException

public CAFBaseRuntimeException(Location location,
                               ResourceAccessor ra,
                               String key)
Constructs a new CAFBaseRuntimeException.

Parameters:
location - logging location
ra - resource accessor
key - the key of the message in the resource bundle

CAFBaseRuntimeException

public CAFBaseRuntimeException(ResourceAccessor ra,
                               String key)
Deprecated. Use CAFBaseRuntimeException(Location, ResourceAccessor, String) instead.

Constructs a new CAFBaseRuntimeException.

Parameters:
ra - resource accessor
key - the key of the message in the resource bundle

CAFBaseRuntimeException

public CAFBaseRuntimeException(Location location,
                               ResourceAccessor ra,
                               String key,
                               Throwable cause)
Constructs a new CAFBaseRuntimeException.

Parameters:
location - logging location
ra - resource accessor
key - the key of the message in the resource bundle
cause - the throwable which caused this exception

CAFBaseRuntimeException

public CAFBaseRuntimeException(ResourceAccessor ra,
                               String key,
                               Throwable cause)
Deprecated. Use CAFBaseRuntimeException(Location, ResourceAccessor, String, Throwable) instead.

Constructs a new CAFBaseRuntimeException.

Parameters:
ra - resource accessor
key - the key of the message in the resource bundle
cause - the throwable which caused this exception

CAFBaseRuntimeException

public CAFBaseRuntimeException(Location location,
                               ResourceAccessor ra,
                               String key,
                               Throwable cause,
                               boolean isRealCause)
Constructs a new CAFBaseRuntimeException.

Parameters:
location - logging location
ra - resource accessor
key - the key of the message in the resource bundle
cause - the throwable which caused this exception
isRealCause - true if the currently constructed exception is the real exception and not just a wrapper, false if cause is the real one

CAFBaseRuntimeException

public CAFBaseRuntimeException(ResourceAccessor ra,
                               String key,
                               Throwable cause,
                               boolean isRealCause)
Deprecated. Use CAFBaseRuntimeException(Location, ResourceAccessor, String, Throwable, boolean) instead.

Constructs a new CAFBaseRuntimeException.

Parameters:
ra - resource accessor
key - the key of the message in the resource bundle
cause - the throwable which caused this exception
isRealCause - true if the currently constructed exception is the real exception and not just a wrapper, false if cause is the real one

CAFBaseRuntimeException

public CAFBaseRuntimeException(Location location,
                               ResourceAccessor ra,
                               String key,
                               Object[] args)
Constructs a new CAFBaseRuntimeException.

Parameters:
location - logging location
ra - resource accessor
key - the key of the message in the resource bundle
args - arguments for the message

CAFBaseRuntimeException

public CAFBaseRuntimeException(ResourceAccessor ra,
                               String key,
                               Object[] args)
Deprecated. Use CAFBaseRuntimeException(Location, ResourceAccessor, String, Object[]) instead.

Constructs a new CAFBaseRuntimeException.

Parameters:
ra - resource accessor
key - the key of the message in the resource bundle
args - arguments for the message

CAFBaseRuntimeException

public CAFBaseRuntimeException(Location location,
                               ResourceAccessor ra,
                               String key,
                               Object[] args,
                               Throwable cause)
Constructs a new CAFBaseRuntimeException.

Parameters:
location - logging location
ra - resource accessor
key - the key of the message in the resource bundle
args - arguments for the message
cause - the throwable which caused this exception

CAFBaseRuntimeException

public CAFBaseRuntimeException(ResourceAccessor ra,
                               String key,
                               Object[] args,
                               Throwable cause)
Deprecated. Use CAFBaseRuntimeException(Location, ResourceAccessor, String, Object[], Throwable) instead.

Constructs a new CAFBaseRuntimeException.

Parameters:
ra - resource accessor
key - the key of the message in the resource bundle
args - arguments for the message
cause - the throwable which caused this exception

CAFBaseRuntimeException

public CAFBaseRuntimeException(Location location,
                               ResourceAccessor ra,
                               String key,
                               Object[] args,
                               Throwable cause,
                               boolean isRealCause)
Constructs a new CAFBaseRuntimeException.

Parameters:
location - logging location
ra - resource accessor
key - the key of the message in the resource bundle
args - arguments for the message
cause - the throwable which caused this exception
isRealCause - true if the currently constructed exception is the real exception and not just a wrapper, false if cause is the real one

CAFBaseRuntimeException

public CAFBaseRuntimeException(ResourceAccessor ra,
                               String key,
                               Object[] args,
                               Throwable cause,
                               boolean isRealCause)
Deprecated. Use CAFBaseRuntimeException(Location, ResourceAccessor, String, Object[], Throwable, boolean) instead.

Constructs a new CAFBaseRuntimeException.

Parameters:
ra - resource accessor
key - the key of the message in the resource bundle
args - arguments for the message
cause - the throwable which caused this exception
isRealCause - true if the currently constructed exception is the real exception and not just a wrapper, false if cause is the real one

CAFBaseRuntimeException

public CAFBaseRuntimeException(Category category,
                               int severity,
                               Location location,
                               ResourceAccessor ra,
                               String key,
                               Object[] args,
                               Throwable cause)
Deprecated. 

Constructs a new CAFBaseRuntimeException.

Parameters:
category - logging category
severity - logging severity
location - logging location
ra - resource accessor
key - the key of the message in the resource bundle
args - arguments for the message
cause - the throwable which caused this exception

CAFBaseRuntimeException

public CAFBaseRuntimeException(Category category,
                               int severity,
                               Location location,
                               ResourceAccessor ra,
                               String key,
                               Object[] args,
                               Throwable cause,
                               boolean isRealCause)
Deprecated. 

Constructs a new CAFBaseRuntimeException.

Parameters:
category - logging category
severity - logging severity
location - logging location
ra - resource accessor
key - the key of the message in the resource bundle
args - arguments for the message
cause - the throwable which caused this exception
isRealCause - true if the currently constructed exception is the real exception and not just a wrapper, false if cause is the real one

CAFBaseRuntimeException

public CAFBaseRuntimeException(String key,
                               Object[] args)
Deprecated. Use CAFBaseRuntimeException#CAFBaseRuntimeException(Location, String, Object[]) instead.

Constructs a new CAFBaseRuntimeException with the default CAF resource accessor.

Parameters:
key - the key of the message in the resource bundle
args - arguments for the message

CAFBaseRuntimeException

public CAFBaseRuntimeException(String key,
                               Object[] args,
                               Throwable cause)
Deprecated. Use CAFBaseRuntimeException#CAFBaseRuntimeException(Location, String, Object[], Throwable) instead.

Constructs a new CAFBaseRuntimeException with the default CAF resource accessor.

Parameters:
key - the key of the message in the resource bundle
args - arguments for the message
cause - the throwable which caused this exception

CAFBaseRuntimeException

public CAFBaseRuntimeException(String key,
                               Object[] args,
                               Throwable cause,
                               boolean isRealCause)
Deprecated. Use CAFBaseRuntimeException#CAFBaseRuntimeException(Location, String, Object[], Throwable, boolean) instead.

Constructs a new CAFBaseRuntimeException with the default CAF resource accessor.

Parameters:
key - the key of the message in the resource bundle
args - arguments for the message
cause - the throwable which caused this exception
isRealCause - true if the currently constructed exception is the real exception and not just a wrapper, false if cause is the real one
Method Detail

getRealCause

public Throwable getRealCause()
Returns the real cause of this exception. This method traverses through the nested exceptions to find the original exception.

Returns:
the real cause of this exception

getLocalizedMessage

public String getLocalizedMessage()
Returns the localized message of the real cause.

Returns:
localized message string

getMessage

public String getMessage()
Returns the message of the real cause.

Returns:
message string

getLocalizedMessage

public String getLocalizedMessage(Locale locale,
                                  TimeZone timeZone)
Returns the localized message of the real cause.

Parameters:
locale - locale to use for formatting
timeZone - time zone to use for formatting
Returns:
localized message string

getLocalizedMessage

public String getLocalizedMessage(Locale locale)
Returns the localized message of the real cause.

Parameters:
locale - locale to use for formatting
Returns:
localized message string

getLocalizedMessage

public String getLocalizedMessage(TimeZone timeZone)
Returns the localized message of the real cause.

Parameters:
timeZone - time zone to use for formatting
Returns:
localized message string


Copyright 2009 SAP AG Complete Copyright Notice