com.sap.tc.mobile.exception
Interface IBaseException

All Known Implementing Classes:
BaseException, BaseRuntimeException, LogonException, MBOModelException, MIParseException, SAPIllegalAccessException, SAPIllegalArgumentException, SAPIllegalStateException, SAPIOException, SAPNullPointerException, SAPNumberFormatException, SAPUnsupportedOperationException

public interface IBaseException

Common interface for BaseException and BaseRuntimeException. Objects of type IBaseException can optionally hold a reference to another Throwable object (root cause) and a language independent message object of type LocalizableText.

See Also:
BaseException, BaseRuntimeException

Field Summary
static Category audit
          Category for logging traces.
 
Method Summary
 java.lang.Throwable getCause()
          Getter method for root cause.
 java.lang.String getLocalizedMessage()
          Gets localized message.
 java.lang.String getNestedLocalizedMessage()
          Chains localized messages of the nested exceptions.
 java.lang.String getNestedStackTraceString()
          Chains the stack trace information of nested exceptions.
 java.lang.String getStackTraceString()
          Gets stack trace information of this exception only.
 java.lang.String getSystemStackTraceString()
          Gets the stack information of this exception in respect of the current system environment.
 java.lang.Throwable initCause(java.lang.Throwable cause)
          Initializes the cause of this exception to the specified value.
 void printStackTrace()
          Prints this exception and its backtrace to the standard error stream.
 void printStackTrace(java.io.PrintStream s)
          Prints this exception and its backtrace to the specified print stream.
 void printStackTrace(java.io.PrintWriter s)
          Prints the action object and its backtrace to the specified print writer.
 

Field Detail

audit

static final Category audit
Category for logging traces.

Method Detail

initCause

java.lang.Throwable initCause(java.lang.Throwable cause)
Initializes the cause of this exception to the specified value. (The cause is the throwable that caused this exception to get thrown.)

This method can be called at most once. That means the cause can be specified only once.

Parameters:
cause - 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.)
Returns:
a reference to this exception instance.
Throws:
java.lang.IllegalArgumentException - if cause is this throwable. (A throwable cannot be its own cause.)
java.lang.IllegalStateException - if the cause was already set

getCause

java.lang.Throwable getCause()
Getter method for root cause.

Returns:
throwable object which caused this exception or null

getLocalizedMessage

java.lang.String getLocalizedMessage()
Gets localized message.

The default locale and default time zone are used for localization.

These values have no effect if the finallyLocalize method has already been called.

Returns:
message string or null

getNestedLocalizedMessage

java.lang.String getNestedLocalizedMessage()
Chains localized messages of the nested exceptions.

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.

Returns:
message string or null

getSystemStackTraceString

java.lang.String getSystemStackTraceString()
Gets the stack information of this exception in respect of the current system environment.

Returns:
the stack trace as a string in respect of the current system

getStackTraceString

java.lang.String getStackTraceString()
Gets stack trace information of this exception only.

The stack traces of nested exceptions are not chained.

Returns:
the stack trace as a string without information of chained exceptions.

getNestedStackTraceString

java.lang.String getNestedStackTraceString()
Chains the stack trace information of nested exceptions.

The caused stack trace is displayed first.

Returns:
the stack trace as a string

printStackTrace

void printStackTrace()
Prints this exception and its backtrace to the standard error stream. This method prints a stack trace for this exception object on the error output stream that is the value of the field System.err.


printStackTrace

void printStackTrace(java.io.PrintStream s)
Prints this exception and its backtrace to the specified print stream.

Parameters:
s - PrintStream to use for output

printStackTrace

void printStackTrace(java.io.PrintWriter s)
Prints the action object and its backtrace to the specified print writer.

Parameters:
s - PrintWriter to use for output