com.sap.engine.interfaces.messaging.api.exception

Class MessagingException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.sap.engine.interfaces.messaging.api.exception.MessagingException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DuplicateMessageException, InvalidParamException, MessageFormatException

public class MessagingException
extends Exception
implements Serializable

The MessagingException is the root exception of the Messaging API.

Version:
$Id: //tc/xpi.ms/dev/src/_interface/pifce/api/com/sap/engine/interfaces/messaging/api/MessagingException.java#4 $
See Also:
Serialized Form

Field Summary
static String ERROR_CATEGORY
           
static String ERROR_CODE
           
protected  String errorCategory
           
protected  String errorCode
           
protected  String errorSource
           
protected  Message messageInError
           
protected  MessageKey messageInErrorKey
           
 
Constructor Summary
MessagingException(Exception nestedException)
          Constructs a MessagingException wrapping a nested exception.
MessagingException(Message messageInError, Exception nestedException)
          Constructs a MessagingException with a reference to the message in error and wrapping a nested exception.
MessagingException(MessageKey messageInErrorKey, Exception nestedException)
          Constructs a MessagingException with a message key of the message in error and wrapping a nested exception.
MessagingException(MessageKey messageInErrorKey, String errorText)
          Constructs a MessagingException with a message key of the message in error and an error text.
MessagingException(Message messageInError, String errorText)
          Constructs a MessagingException with a reference to the message in error and an error text.
MessagingException(String errorText)
          Constructs a MessagingException with an error text.
MessagingException(String errorText, Exception nestedException)
          Constructs a MessagingException wrapping a nested exception.
 
Method Summary
 String getErrorCategory()
           
 String getErrorCode()
           
 String getErrorSource()
           
 String getMessageInErrorId()
          Returns the message ID of the message that this exception is referring to.
 MessageKey getMessageInErrorKey()
          Returns the message ID of the message that this exception is referring to.
 Exception getNestedException()
          Returns the nested exception that is wrapped in this exception.
 void setErrorCategory(String string)
           
 void setErrorCode(String string)
           
 void setErrorSource(String source)
           
 void setNestedException(Exception ex)
           
 String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ERROR_CATEGORY

public static final String ERROR_CATEGORY
See Also:
Constant Field Values

ERROR_CODE

public static final String ERROR_CODE
See Also:
Constant Field Values

messageInError

protected Message messageInError

messageInErrorKey

protected MessageKey messageInErrorKey

errorSource

protected String errorSource

errorCategory

protected String errorCategory

errorCode

protected String errorCode
Constructor Detail

MessagingException

public MessagingException(String errorText)
Constructs a MessagingException with an error text. Whenever possible, a constructor that also takes a reference to the message in error as a parameter should be preferred.

Parameters:
errorText - is a free form description of the error.

MessagingException

public MessagingException(Exception nestedException)
Constructs a MessagingException wrapping a nested exception. Whenever possible, a constructor that also takes a reference to the message in error as a parameter should be preferred.

Parameters:
nestedException - the causing exception that is to be wrapped in this exception.

MessagingException

public MessagingException(String errorText,
                          Exception nestedException)
Constructs a MessagingException wrapping a nested exception. A free error text can be defined with the first parameter.

Parameters:
errorText - the error text of the MessagingException object.
nestedException - the causing exception that is to be wrapped in this exception.

MessagingException

public MessagingException(Message messageInError,
                          String errorText)
Constructs a MessagingException with a reference to the message in error and an error text.

Parameters:
messageInError - is the message that this exception is referring to.
errorText - is a free form description of the error.

MessagingException

public MessagingException(Message messageInError,
                          Exception nestedException)
Constructs a MessagingException with a reference to the message in error and wrapping a nested exception.

Parameters:
messageInError - is the message that this exception is referring to.
nestedException - the causing exception that is to be wrapped in this exception.

MessagingException

public MessagingException(MessageKey messageInErrorKey,
                          String errorText)
Constructs a MessagingException with a message key of the message in error and an error text.

Parameters:
messageInErrorKey - is the message key of the message that this exception is referring to.
errorText - is a free form description of the error.

MessagingException

public MessagingException(MessageKey messageInErrorKey,
                          Exception nestedException)
Constructs a MessagingException with a message key of the message in error and wrapping a nested exception.

Parameters:
messageInErrorKey - is the message key of the message that this exception is referring to.
nestedException - the causing exception that is to be wrapped in this exception.
Method Detail

getMessageInErrorId

public String getMessageInErrorId()
Returns the message ID of the message that this exception is referring to.

Returns:
String message ID of the message that this error is referring to or null if there is no message associated with this exception.

getMessageInErrorKey

public MessageKey getMessageInErrorKey()
Returns the message ID of the message that this exception is referring to.

Returns:
String message ID of the message that this error is referring to or null if there is no message associated with this exception.

getNestedException

public Exception getNestedException()
Returns the nested exception that is wrapped in this exception. Note that nested exceptions are not serialized so they are lost serialization takes place between construction and invokation of this method.

Returns:
Exception the exception that is wrapped in this exception or null if no exception was wrapped in this exception.

setNestedException

public void setNestedException(Exception ex)

toString

public String toString()
Overrides:
toString in class Throwable

getErrorCategory

public String getErrorCategory()

getErrorCode

public String getErrorCode()

getErrorSource

public String getErrorSource()

setErrorCategory

public void setErrorCategory(String string)

setErrorCode

public void setErrorCode(String string)

setErrorSource

public void setErrorSource(String source)


Copyright 2009 SAP AG Complete Copyright Notice