public abstract class CheckerException extends IOException implements IBaseException
Subclasses of this exception class support internationalizable error texts, exception chaining and logging.
Copyright: Copyright (c) 2002 Company: SAP Portals
Modifier and Type | Field and Description |
---|---|
static boolean |
DONT_LOG
constant for not logging the exception
|
static boolean |
LOG
constant for logging the exception
|
Constructor and Description |
---|
CheckerException(boolean log)
constructs a new CheckerException without a message
|
CheckerException(IText aText,
boolean log)
constructs a new CheckerException with a causing throwable for
exception chaining and uses the default mechanism to read message texts
|
CheckerException(String aTextKey,
boolean log)
constructs a new CheckerException with a causing throwable for
exception chaining and uses the default mechanism to read message texts
|
CheckerException(String aTextKey,
Object[] messageParameters,
boolean log)
constructs a new CheckerException with a causing throwable for
exception chaining and uses the default mechanism to read message texts
|
CheckerException(String aTextKey,
Object[] messageParameters,
TextBundle aTextBundle,
boolean log)
constructs a new CheckerException with a causing throwable for
exception chaining and an independent message bundle
|
CheckerException(Throwable aCausingThrowable,
boolean log)
constructs a new CheckerException with a causing throwable for
exception chaining.
|
CheckerException(Throwable aCausingThrowable,
IText aText,
boolean log)
constructs a new CheckerException with a causing throwable for
exception chaining and a given internationalizable text
|
CheckerException(Throwable aCausingThrowable,
String aTextKey,
boolean log)
constructs a new CheckerException with a causing throwable for
exception chaining and uses the default mechanism to read message texts
|
CheckerException(Throwable aCausingThrowable,
String aTextKey,
Object[] messageParameters,
boolean log)
constructs a new CheckerException with a causing throwable for
exception chaining and uses the default mechanism to read message texts
|
CheckerException(Throwable aCausingThrowable,
String aTextKey,
Object[] messageParameters,
TextBundle aTextBundle,
boolean log)
constructs a new CheckerException with a causing throwable for
exception chaining and an independent message bundle
|
CheckerException(Throwable aCausingThrowable,
String aTextKey,
TextBundle aTextBundle,
boolean log)
constructs a new CheckerException with a causing throwable for
exception chaining and an independent message bundle
|
Modifier and Type | Method and Description |
---|---|
Throwable |
getCausingThrowable()
returns the causing throwable if there is one or null
|
String |
getKey() |
String |
getMessage()
returns an error message formated with the logging locale
|
String |
getMessage(Locale locale)
returns a locale specific short error message.
|
Throwable |
getRootThrowable()
returns the top most throwable in the exception chain.
|
IText |
getText()
returns the text object representing the error message
|
String |
getUniqueMessageKey() |
boolean |
isLogged()
checks, if the exception was already logged
|
void |
logException()
logs the exception using the standard SAP logger
|
void |
printStackTrace()
overwrites the original printStackTrace method to also print chained stack
traces.
|
void |
printStackTrace(PrintStream stream)
overwrites the original printStackTrace method to also print chained stack
traces.
|
void |
printStackTrace(PrintWriter writer)
overwrites the original printStackTrace method to also print chained stack
traces.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
public static final boolean LOG
public static final boolean DONT_LOG
public CheckerException(boolean log)
log
- true, if exception should be loggedpublic CheckerException(String aTextKey, boolean log)
aTextKey
- key for an internationalized message, or null if no new
message should be setlog
- true, if exception should be loggedpublic CheckerException(IText aText, boolean log)
aText
- internationalizable text, or null if no new message should be
setlog
- true, if exception should be loggedpublic CheckerException(String aTextKey, Object[] messageParameters, boolean log)
aTextKey
- key for an internationalized message, or null if no new
message should be setmessageParameters
- objects to fill message place holders,
or null if there are no parameterslog
- true, if exception should be loggedpublic CheckerException(String aTextKey, Object[] messageParameters, TextBundle aTextBundle, boolean log)
aTextKey
- key for an internationalized message, or null if no new
message should be setmessageParameters
- objects to fill message place holders,
or null if there are no parametersaTextBundle
- message bundle to read the text message from, or null
to use the default mechanism to read text messageslog
- true, if exception should be loggedpublic CheckerException(Throwable aCausingThrowable, boolean log)
aCausingThrowable
- causing throwable for exception chaining, of null
if there is no causing exceptionlog
- true, if exception should be loggedpublic CheckerException(Throwable aCausingThrowable, String aTextKey, TextBundle aTextBundle, boolean log)
aCausingThrowable
- causing throwable for exception chaining, of null
if there is no causing exceptionaTextKey
- key for an internationalized message, or null if no new
message should be setaTextBundle
- message bundle to read the text message from, or null
to use the default mechanism to read text messageslog
- true, if exception should be loggedpublic CheckerException(Throwable aCausingThrowable, String aTextKey, boolean log)
aCausingThrowable
- causing throwable for exception chaining, of null
if there is no causing exceptionaTextKey
- key for an internationalized message, or null if no new
message should be setlog
- true, if exception should be loggedpublic CheckerException(Throwable aCausingThrowable, IText aText, boolean log)
aCausingThrowable
- causing throwable for exception chaining, of null
if there is no causing exceptionaText
- internationalizable message, or null if no new
message should be setlog
- true, if exception should be loggedpublic CheckerException(Throwable aCausingThrowable, String aTextKey, Object[] messageParameters, boolean log)
aCausingThrowable
- causing throwable for exception chaining, of null
if there is no causing exceptionaTextKey
- key for an internationalized message, or null if no new
message should be setmessageParameters
- objects to fill message place holders,
or null if there are no parameterslog
- true, if exception should be loggedpublic CheckerException(Throwable aCausingThrowable, String aTextKey, Object[] messageParameters, TextBundle aTextBundle, boolean log)
aCausingThrowable
- causing throwable for exception chaining, of null
if there is no causing exceptionaTextKey
- key for an internationalized message, or null if no new
message should be setmessageParameters
- objects to fill message place holders,
or null if there are no parametersaTextBundle
- message bundle to read the text message from, or null
to use the default mechanism to read text messageslog
- true, if exception should be loggedpublic void logException()
logException
in interface IBaseException
public boolean isLogged()
isLogged
in interface IBaseException
public String getMessage()
getMessage
in interface IBaseException
getMessage
in class Throwable
public String getMessage(Locale locale)
getMessage
in interface IBaseException
locale
- the locale for the messagepublic IText getText()
getText
in interface IBaseException
public void printStackTrace()
printStackTrace
in interface IBaseException
printStackTrace
in class Throwable
public void printStackTrace(PrintStream stream)
printStackTrace
in interface IBaseException
printStackTrace
in class Throwable
stream
- PrintStream for outputpublic void printStackTrace(PrintWriter writer)
printStackTrace
in interface IBaseException
printStackTrace
in class Throwable
writer
- PrintWriter for outputpublic Throwable getCausingThrowable()
getCausingThrowable
in interface IBaseException
public String getKey()
public String getUniqueMessageKey()
public Throwable getRootThrowable()
this
.getRootThrowable
in interface IBaseException
Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice