com.sap.security.core.server.vsi.api.exception
Class VSIServiceException

com.sap.security.core.server.vsi.api.exception.VSIServiceException
Direct Known Subclasses:
VirusInfectionException, VirusScanException

public class VSIServiceException

Root exception for all exceptions of the VSI Service. Where necessary, further refinements are possible.

History:

     1.0      Initial Version for SAP NetWeaver 04
     1.1      Added a pattern for clean test.
     1.5      Enhancements in the native VSI layer
     1.6      Dual runtime support (JAVA standalone and J2EE)
	

Since:
1.0
Version:
1.6, $DateTime: 2007/03/27 12:26:05 $

Field Summary
static java.lang.String EXPLANATION_FINALLY_EXCEPTION
           
 
Constructor Summary
VSIServiceException(com.sap.tc.logging.Location location, VSIServiceMessage message, java.lang.Throwable rootCause)
          Constructor for VSIServiceException.
VSIServiceException(java.lang.Throwable wrappedThrowable)
          Constructor for VSIServiceException.
VSIServiceException(VSIServiceMessage message, int lastErrorRC, java.lang.Throwable cause)
          Constructor for VSIServiceException.
VSIServiceException(VSIServiceMessage message, java.lang.Throwable cause)
          Constructor for VSIServiceException.
 
Method Summary
 VSIServiceMessage getIDMessage()
          Return the outermost available VSIMessage object in the exception.
 java.lang.String getLastErrorKey()
          Return the last orrured error code key in printable form (String).
 int getLastErrorRC()
          Return the last occured error code.
 java.lang.String getMessage()
          This method is not implemented in the SAP Exception Framework, but must be present for compatibility with Throwable.
 boolean isExternalizable()
           
 java.lang.String logIDException(int severity, com.sap.tc.logging.Category category, com.sap.tc.logging.Location location, java.lang.String sublocation)
          Log this instance of the VSIServiceException.
 

Field Detail

EXPLANATION_FINALLY_EXCEPTION

public static final java.lang.String EXPLANATION_FINALLY_EXCEPTION
Constructor Detail

VSIServiceException

public VSIServiceException(com.sap.tc.logging.Location location,
                           VSIServiceMessage message,
                           java.lang.Throwable rootCause)
Constructor for VSIServiceException.
See Also:
VSIServiceException(Location, VSIServiceMessage, Throwable)

VSIServiceException

public VSIServiceException(java.lang.Throwable wrappedThrowable)
Constructor for VSIServiceException.
Parameters:
wrappedThrowable - Throwable error cause

VSIServiceException

public VSIServiceException(VSIServiceMessage message,
                           java.lang.Throwable cause)
Constructor for VSIServiceException.
Parameters:
message - VSIMessage Message from VSI text pool
cause - Throwable error cause

VSIServiceException

public VSIServiceException(VSIServiceMessage message,
                           int lastErrorRC,
                           java.lang.Throwable cause)
Constructor for VSIServiceException.
Parameters:
message - VSIMessage Message from VSI text pool
lastErrorRC - The last occured error return code.
cause - Throwable error cause
Method Detail

getLastErrorRC

public int getLastErrorRC()
Return the last occured error code.
Returns:
Return code from VSIConstans
See Also:
VSIConstants

getLastErrorKey

public java.lang.String getLastErrorKey()
Return the last orrured error code key in printable form (String).
Returns:
Return code from VSIConstans as String

getIDMessage

public VSIServiceMessage getIDMessage()
Return the outermost available VSIMessage object in the exception.
Returns:
An VSIMessage as described above.

isExternalizable

public boolean isExternalizable()
See Also:
ExternalizableException

getMessage

public java.lang.String getMessage()
This method is not implemented in the SAP Exception Framework, but must be present for compatibility with Throwable.

logIDException

public java.lang.String logIDException(int severity,
                                       com.sap.tc.logging.Category category,
                                       com.sap.tc.logging.Location location,
                                       java.lang.String sublocation)
Log this instance of the VSIServiceException. This includes the following steps: This method should not be used to log every exception that appears within arbitrary methods. It should only be used to log exceptions at the top-most level of processing, i.e. in locations that form an interface of the functionality to another system or a human user. Examples: Servlets, LoginModules, ... Non-Examples: API methods, private methods, ...
Parameters:
severity - One of the constants in class Severity
category - The Category under which the exception should be logged. This refers to the exception message text (nested, non-localized).
location - The location for the exception audit. Using this location, the stack trace of the exception will be logged, using the audit category as relative (currently "/System/Audit").
sublocation - The method name for the location.
Returns:
A string that contains either the message text of the exception This text is intended to be given to an external system.