com.sap.tc.mobile.exception.standard
Class SAPNullPointerException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.NullPointerException
                  extended by com.sap.tc.mobile.exception.standard.SAPNullPointerException
All Implemented Interfaces:
IBaseException, java.io.Serializable

public class SAPNullPointerException
extends java.lang.NullPointerException
implements IBaseException

Wrapper class for NullPointerException.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.sap.tc.mobile.exception.IBaseException
audit
 
Constructor Summary
SAPNullPointerException(Location loc)
          Constructs an exception.
SAPNullPointerException(Location loc, MsgObject msgObject)
          Constructs an exception with the specified root cause, which caused this exception.
SAPNullPointerException(Location loc, MsgObject msgObject, java.lang.Object[] args)
          Constructs an exception with the specified root cause, which caused this exception.
SAPNullPointerException(Location loc, MsgObject msgObject, java.lang.Object[] args, java.lang.Throwable rootCause)
          Constructs an exception with the specified root cause, which caused this exception.
SAPNullPointerException(Location loc, java.lang.Throwable rootCause)
          Constructs an exception with the specified root cause, which caused this exception.
 
Method Summary
 java.lang.Throwable getCause()
          Getter method for root cause.
 java.lang.String getLocalizedMessage()
          Gets localized message.
 Location getLogLocation()
          Getter method for logging location.
 java.lang.String getMessage()
           
 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.
 
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

SAPNullPointerException

public SAPNullPointerException(Location loc)
Constructs an exception.

Parameters:
loc - logging location which will be used in case of automatic tracing logging location.

SAPNullPointerException

public SAPNullPointerException(Location loc,
                               java.lang.Throwable rootCause)
Constructs an exception with the specified root cause, which caused this exception.

Parameters:
loc - logging location which will be used in case of automatic tracing logging location.
rootCause - throwable object which caused this exception.

SAPNullPointerException

public SAPNullPointerException(Location loc,
                               MsgObject msgObject)
Constructs an exception with the specified root cause, which caused this exception.

Parameters:
loc - logging location which will be used in case of automatic tracing logging location.
msgObject - message object.

SAPNullPointerException

public SAPNullPointerException(Location loc,
                               MsgObject msgObject,
                               java.lang.Object[] args)
Constructs an exception with the specified root cause, which caused this exception.

Parameters:
loc - logging location which will be used in case of automatic tracing logging location.
msgObject - message object.
args - arguments for message.

SAPNullPointerException

public SAPNullPointerException(Location loc,
                               MsgObject msgObject,
                               java.lang.Object[] args,
                               java.lang.Throwable rootCause)
Constructs an exception with the specified root cause, which caused this exception.

Parameters:
loc - logging location which will be used in case of automatic tracing logging location.
msgObject - message object.
args - arguments for message.
rootCause - throwable object which caused this exception.
Method Detail

initCause

public java.lang.Throwable initCause(java.lang.Throwable cause)
Description copied from interface: IBaseException
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.

Specified by:
initCause in interface IBaseException
Overrides:
initCause in class java.lang.Throwable
Parameters:
cause - the cause (which is saved for later retrieval by the IBaseException.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Returns:
a reference to this exception instance.
See Also:
IBaseException.initCause(Throwable)

getCause

public java.lang.Throwable getCause()
Description copied from interface: IBaseException
Getter method for root cause.

Specified by:
getCause in interface IBaseException
Overrides:
getCause in class java.lang.Throwable
Returns:
throwable object which caused this exception or null
See Also:
IBaseException.getCause()

getLocalizedMessage

public java.lang.String getLocalizedMessage()
Description copied from interface: IBaseException
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.

Specified by:
getLocalizedMessage in interface IBaseException
Overrides:
getLocalizedMessage in class java.lang.Throwable
Returns:
message string or null
See Also:
IBaseException.getLocalizedMessage()

getNestedLocalizedMessage

public java.lang.String getNestedLocalizedMessage()
Description copied from interface: IBaseException
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.

Specified by:
getNestedLocalizedMessage in interface IBaseException
Returns:
message string or null
See Also:
IBaseException.getNestedLocalizedMessage()

getSystemStackTraceString

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

Specified by:
getSystemStackTraceString in interface IBaseException
Returns:
the stack trace as a string in respect of the current system
See Also:
IBaseException.getSystemStackTraceString()

getStackTraceString

public java.lang.String getStackTraceString()
Description copied from interface: IBaseException
Gets stack trace information of this exception only.

The stack traces of nested exceptions are not chained.

Specified by:
getStackTraceString in interface IBaseException
Returns:
the stack trace as a string without information of chained exceptions.
See Also:
IBaseException.getStackTraceString()

getNestedStackTraceString

public java.lang.String getNestedStackTraceString()
Description copied from interface: IBaseException
Chains the stack trace information of nested exceptions.

The caused stack trace is displayed first.

Specified by:
getNestedStackTraceString in interface IBaseException
Returns:
the stack trace as a string
See Also:
IBaseException.getNestedStackTraceString()

printStackTrace

public void printStackTrace()
Description copied from interface: IBaseException
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.

Specified by:
printStackTrace in interface IBaseException
Overrides:
printStackTrace in class java.lang.Throwable
See Also:
IBaseException.printStackTrace()

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Description copied from interface: IBaseException
Prints this exception and its backtrace to the specified print stream.

Specified by:
printStackTrace in interface IBaseException
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - PrintStream to use for output
See Also:
IBaseException.printStackTrace(PrintStream)

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Description copied from interface: IBaseException
Prints the action object and its backtrace to the specified print writer.

Specified by:
printStackTrace in interface IBaseException
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - PrintWriter to use for output
See Also:
IBaseException.printStackTrace(PrintWriter)

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable
See Also:
getLocalizedMessage()

getLogLocation

public Location getLogLocation()
Getter method for logging location.

If no location is specified, null is returned.

Returns:
logging location