|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.sap.exception.BaseException
Base class for all other subclasses of Exception.
Objects of type BaseException can optionally hold a
reference to another Throwable object (root cause),
a language independent message object of type LocalizableText.
IBaseException,
LocalizableText,
BaseRuntimeException,
Serialized Form| Field Summary |
| Fields inherited from interface com.sap.exception.IBaseException |
audit, defaultLocale |
| Constructor Summary | |
BaseException()
Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility. |
|
BaseException(BaseExceptionInfo info)
Constructs an exception out of a BaseExceptionInfo
object. |
|
BaseException(Category cat,
int severity,
Location loc,
LocalizableText locMessage,
Throwable rootCause)
Deprecated. Category and severity must not be used inside of Exception API. The method is left for backward compatibility. |
|
BaseException(Category cat,
int severity,
Location loc,
ResourceAccessor accessor,
String patternKey,
Object[] parameters,
Throwable rootCause)
Deprecated. Category and severity must not be used inside of Exception API. The method is left for backward compatibility. |
|
BaseException(LocalizableText locMessage)
Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility. |
|
BaseException(LocalizableText locMessage,
Throwable rootCause)
Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility. |
|
BaseException(Location loc)
Constructs a simple exception. |
|
BaseException(Location loc,
LocalizableText locMessage)
Constructs an exception with a localizable text message. |
|
BaseException(Location loc,
LocalizableText locMessage,
Throwable rootCause)
Constructs an exception with a localizable text message and the specified root cause, which caused this exception. |
|
BaseException(Location loc,
ResourceAccessor accessor,
LocalizableText.Msg msg)
Constructs an exception with a resource accessor, a pattern key and object parameters for the message text. |
|
BaseException(Location loc,
ResourceAccessor accessor,
LocalizableText.Msg msg,
Throwable rootCause)
Constructs an exception with a resource accessor, a pattern key, object parameters for the message text and a root cause. |
|
BaseException(Location loc,
ResourceAccessor accessor,
String patternKey)
Constructs an exception with a resource accessor and a pattern key for the message text. |
|
BaseException(Location loc,
ResourceAccessor accessor,
String patternKey,
Object[] parameters)
Constructs an exception with a resource accessor, a pattern key and object parameters for the message text. |
|
BaseException(Location loc,
ResourceAccessor accessor,
String patternKey,
Object[] parameters,
Throwable rootCause)
Constructs an exception with a resource accessor, a pattern key, object parameters for the message text and a root cause. |
|
BaseException(Location loc,
ResourceAccessor accessor,
String patternKey,
Throwable rootCause)
Constructs an exception with a resource accessor, a pattern key for the message text and a root cause. |
|
BaseException(Location loc,
Throwable rootCause)
Constructs an exception with the specified root cause. |
|
BaseException(ResourceAccessor accessor,
LocalizableText.Msg msg)
Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility. |
|
BaseException(ResourceAccessor accessor,
LocalizableText.Msg msg,
Throwable rootCause)
Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility. |
|
BaseException(ResourceAccessor accessor,
String patternKey)
Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility. |
|
BaseException(ResourceAccessor accessor,
String patternKey,
Object[] parameters)
Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility. |
|
BaseException(ResourceAccessor accessor,
String patternKey,
Object[] parameters,
Throwable rootCause)
Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility. |
|
BaseException(ResourceAccessor accessor,
String patternKey,
Throwable rootCause)
Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility. |
|
BaseException(Throwable rootCause)
Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility. |
|
| Method Summary | |
void |
finallyLocalize()
Finally localizes the LocalizableText message
(if there is one attached).
|
void |
finallyLocalize(Locale loc)
Finally localizes the LocalizableText message
(if there is one attached).
|
void |
finallyLocalize(Locale loc,
TimeZone timeZone)
Finally localizes the LocalizableText message
(if there is one attached).
|
void |
finallyLocalize(TimeZone timeZone)
Finally localizes the LocalizableText message
(if there is one attached).
|
Throwable |
getCause()
Getter method for root cause. |
LocalizableText |
getLocalizableMessage()
Getter method for localizable message. |
String |
getLocalizedMessage()
Gets localized message. |
String |
getLocalizedMessage(Locale loc)
Gets localized message. |
String |
getLocalizedMessage(Locale loc,
TimeZone timeZone)
Gets localized message. |
String |
getLocalizedMessage(TimeZone timeZone)
Gets localized message. |
Category |
getLogCategory()
Getter method for logging category. |
Location |
getLogLocation()
Getter method for logging location. |
int |
getLogSeverity()
Getter method for logging severity. |
String |
getMessage()
|
String |
getNestedLocalizedMessage()
Chains localized messages of the nested exceptions. |
String |
getNestedLocalizedMessage(Locale loc)
Chains localized messages of the nested exceptions. |
String |
getNestedLocalizedMessage(Locale loc,
TimeZone timeZone)
Chains localized message of the nested exceptions. |
String |
getNestedLocalizedMessage(TimeZone timeZone)
Chains localized message of the nested exceptions. |
String |
getNestedStackTraceString()
Chains the stack trace information of nested exceptions. |
String |
getStackTraceString()
Gets stack trace information of this exception only. |
String |
getSystemStackTraceString()
Gets the stack information of this exception in respect of the current system environment. |
Throwable |
initCause(Throwable cause)
Initializes the cause of this exception to the specified value. |
void |
log()
Deprecated. Instead of this method it should be used some suitable method from Logging API. The method is left for backward compatibility. |
void |
printStackTrace()
Prints this exception and its backtrace to the standard error stream. |
void |
printStackTrace(PrintStream s)
Prints this exception object and its backtrace to the specified print stream. |
void |
printStackTrace(PrintWriter s)
Prints this exception object and its backtrace to the specified print writer. |
void |
restoreLogSettings()
Deprecated. Category and severity must not be used inside of Exception API. The method is left for backward compatibility. |
void |
setLogSettings(Category cat,
int severity,
Location loc)
Deprecated. Category and severity must not be used inside of Exception API. The method is left for backward compatibility. |
void |
trace(int severity,
Location loc)
Deprecated. When is created the exception is traced automatically with severity PATH. To make traces with higher severity if should be used some suitable method from Logging API. The method is left for backward compatibility. |
void |
trace(int severity,
Location loc,
String subloc)
Deprecated. When is created the exception is traced automatically with severity PATH. To make traces with higher severity if should be used some suitable method from Logging API. The method is left for backward compatibility. |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public BaseException()
public BaseException(Location loc)
loc - logging location which will be used in case of automatic tracingpublic BaseException(BaseExceptionInfo info)
BaseExceptionInfo
object.
info - BaseExceptionInfopublic BaseException(Throwable rootCause)
rootCause - throwable object which caused this exception
public BaseException(Location loc,
Throwable rootCause)
loc - logging location which will be used in case of automatic tracingrootCause - throwable object which caused this exceptionpublic BaseException(LocalizableText locMessage)
locMessage - localizable text message
public BaseException(Location loc,
LocalizableText locMessage)
loc - logging location which will be used in case of automatic tracinglocMessage - localizable text message
public BaseException(LocalizableText locMessage,
Throwable rootCause)
locMessage - localizable text messagerootCause - throwable object, which caused this exception
public BaseException(Location loc,
LocalizableText locMessage,
Throwable rootCause)
loc - logging location which will be used in case of automatic tracinglocMessage - localizable text messagerootCause - throwable object, which caused this exception
public BaseException(Category cat,
int severity,
Location loc,
LocalizableText locMessage,
Throwable rootCause)
cat - logging categoryseverity - logging severityloc - logging locationlocMessage - localizable text messagerootCause - throwable object, which caused this exception
public BaseException(ResourceAccessor accessor,
String patternKey)
accessor - resource accessorpatternKey - pattern key for text message
public BaseException(Location loc,
ResourceAccessor accessor,
String patternKey)
loc - logging location which will be used in case of automatic tracingaccessor - resource accessorpatternKey - pattern key for text message
public BaseException(ResourceAccessor accessor,
String patternKey,
Throwable rootCause)
accessor - resource accessorpatternKey - pattern key for text messagerootCause - throwable object, which caused this exception
public BaseException(Location loc,
ResourceAccessor accessor,
String patternKey,
Throwable rootCause)
loc - logging location which will be used in case of automatic tracingaccessor - resource accessorpatternKey - pattern key for text messagerootCause - throwable object, which caused this exception
public BaseException(ResourceAccessor accessor,
String patternKey,
Object[] parameters)
accessor - resource accessorpatternKey - pattern key for text messageparameters - message parameters
public BaseException(Location loc,
ResourceAccessor accessor,
String patternKey,
Object[] parameters)
loc - logging location which will be used in case of automatic tracingaccessor - resource accessorpatternKey - pattern key for text messageparameters - message parameters
public BaseException(ResourceAccessor accessor,
String patternKey,
Object[] parameters,
Throwable rootCause)
accessor - resource accessorpatternKey - pattern key for text messageparameters - message parametersrootCause - throwable object, which caused this exception
public BaseException(Location loc,
ResourceAccessor accessor,
String patternKey,
Object[] parameters,
Throwable rootCause)
loc - logging location which will be used in case of automatic tracingaccessor - resource accessorpatternKey - pattern key for text messageparameters - message parametersrootCause - throwable object, which caused this exception
public BaseException(Category cat,
int severity,
Location loc,
ResourceAccessor accessor,
String patternKey,
Object[] parameters,
Throwable rootCause)
cat - logging categoryseverity - logging severityloc - logging locationrootCause - throwable object, which caused this exception
public BaseException(ResourceAccessor accessor,
LocalizableText.Msg msg)
accessor - resource accessormsg - containing message key and parameters
public BaseException(Location loc,
ResourceAccessor accessor,
LocalizableText.Msg msg)
loc - logging location which will be used in case of automatic tracingaccessor - resource accessormsg - containing message key and parameters
public BaseException(ResourceAccessor accessor,
LocalizableText.Msg msg,
Throwable rootCause)
accessor - resource accessormsg - containing message key and parametersrootCause - throwable object, which caused this exception
public BaseException(Location loc,
ResourceAccessor accessor,
LocalizableText.Msg msg,
Throwable rootCause)
loc - logging location which will be used in case of automatic tracingaccessor - resource accessormsg - containing message key and parametersrootCause - throwable object, which caused this exception| Method Detail |
public Throwable initCause(Throwable cause)
This method can be called at most once. That means the cause can be specified only once.
initCause in interface IBaseExceptioncause - the cause (which is saved for later retrieval by the
getCause() method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.)
IllegalArgumentException - if cause is this
throwable. (A throwable cannot be its own cause.)
IllegalStateException - if the cause was already setpublic Throwable getCause()
getCause in interface IBaseExceptionpublic LocalizableText getLocalizableMessage()
getLocalizableMessage in interface IBaseExceptionpublic String getLocalizedMessage()
The default locale and default time zone are used for localization.
These values have no effect if the finallyLocalize method has already been called.
getLocalizedMessage in interface IBaseExceptionpublic String getLocalizedMessage(Locale loc)
The specified locale and the default time zone are used for localization. The default locale will be used if the Locale parameter is null.
These values have no effect if the finallyLocalize method has been already called.
getLocalizedMessage in interface IBaseExceptionloc - locale
public String getLocalizedMessage(TimeZone timeZone)
The specified time zone and the default locale are used for localization. The default time zone will be used, if the time zone parameter is null.
These values have no effect if the finallyLocalize method has been already called.
getLocalizedMessage in interface IBaseExceptiontimeZone - time zone
public String getLocalizedMessage(Locale loc,
TimeZone timeZone)
The specified time zone and locale are used for localization. The default time zone and the default locale will be used, if the time zone parameter and the locale are null respectively.
These values have no effect if the finallyLocalize method has been already called.
getLocalizedMessage in interface IBaseExceptionloc - localetimeZone - time zone
public String getNestedLocalizedMessage()
The default locale and the default time zone are used for localization.
These values have no effect if the finallyLocalize method has already been called.
getNestedLocalizedMessage in interface IBaseExceptionpublic String getNestedLocalizedMessage(Locale loc)
The specified locale and the default time zone are used for localization. The default locale will be used if the Locale parameter is null.
These values have no effect if the finallyLocalize method has been already called.
If the localized message is not specified, the non-localizable message is returned (if specified).
getNestedLocalizedMessage in interface IBaseExceptionloc - locale
public String getNestedLocalizedMessage(TimeZone timeZone)
The specified time zone and the default locale are used for localization. The default time zone will be used, if the time zone parameter is null.
These values have no effect if the finallyLocalize method has been already called.
getNestedLocalizedMessage in interface IBaseExceptiontimeZone - time zone
public String getNestedLocalizedMessage(Locale loc,
TimeZone timeZone)
The specified time zone and locale are used for localization. The default time zone and the default locale will be used, if the time zone parameter and the locale parameter are null respectively.
These values have no effect if the finallyLocalize method has been already called.
getNestedLocalizedMessage in interface IBaseExceptionloc - localetimeZone - time zone
public void finallyLocalize()
LocalizableText message
(if there is one attached).
That means no further localization process can be performed
on that object. If there is a nested exception implementing
IBaseException, it will be localized recursively.
The default locale and the default time zone are used for localization.
finallyLocalize in interface IBaseExceptionpublic void finallyLocalize(Locale loc)
LocalizableText message
(if there is one attached).
That means no further localization process can be performed
on that object. If there is a nested exception implementing
IBaseException, it will be localized recursively.
The specified locale and the default time zone are used for localization. If the locale parameter is null, the default locale will be used.
finallyLocalize in interface IBaseExceptionloc - localepublic void finallyLocalize(TimeZone timeZone)
LocalizableText message
(if there is one attached).
That means no further localization process can be performed
on that object. If there is a nested exception implementing
IBaseException, it will be localized recursively.
The specified time zone and the default locale are used for localization. If the time zone parameter is null, the default time zone will be used.
finallyLocalize in interface IBaseExceptiontimeZone - time zone
public void finallyLocalize(Locale loc,
TimeZone timeZone)
LocalizableText message
(if there is one attached).
That means no further localization process can be performed
on that object. If there is a nested exception implementing
IBaseException, it will be localized recursively.
The specified locale and time zone parameter are used for localization. If the locale parameter or the time zone are null, the default values will be used respectively.
finallyLocalize in interface IBaseExceptionloc - localetimeZone - time zonepublic String getSystemStackTraceString()
getSystemStackTraceString in interface IBaseExceptionpublic String getStackTraceString()
getStackTraceString in interface IBaseExceptionpublic String getNestedStackTraceString()
getNestedStackTraceString in interface IBaseExceptionpublic void printStackTrace()
System.err.
printStackTrace in interface IBaseExceptionpublic void printStackTrace(PrintStream s)
printStackTrace in interface IBaseExceptions - PrintStream to use for outputpublic void printStackTrace(PrintWriter s)
printStackTrace in interface IBaseExceptions - PrintWriter to use for outputpublic Category getLogCategory()
If no category is specified, null is returned.
public int getLogSeverity()
If no severity is specified,
Severity.NONE is returned.
public Location getLogLocation()
If no location is specified, null is returned.
public void setLogSettings(Category cat,
int severity,
Location loc)
setLogSettings in interface IBaseExceptioncat - logging categoryseverity - logging severityloc - logging locationpublic void log()
The logging takes only place if the category and location are set properly
via the constructor or the setLogSettings() method.
log in interface IBaseExceptionsetLogSettings(Category, int, Location)public String getMessage()
getLocalizedMessage()
public void trace(int severity,
Location loc)
The used category is defined by the
IBaseException.audit property.
severity - severity of messageloc - location message stems from
public void trace(int severity,
Location loc,
String subloc)
The used category is defined by the
IBaseException.audit property.
severity - severity of messageloc - location message stems fromsubloc - name of sublocationpublic void restoreLogSettings()
setLogSettings(Category, int, Location)
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||