SAP NetWeaver 7.1 Composition Environment

com.sap.security.api
Class UMException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.sap.security.api.UMException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AttributeValueAlreadyExistsException, AuthenticationFailedException, CertificateAlreadyInUseException, DuplicateKeyException, InvalidIDException, InvalidLogonIdException, InvalidPasswordException, NoLogonDataAvailableException, NoSuchPrincipalException, ObjectAlreadyExistsException, PrincipalAlreadyExistsException, SearchResultSizeLimitExceededException, TicketException, UserLockedException

public class UMException
extends Exception

This is the superclass of all checked exceptions employed in the user management; it indicates error conditions that reasonable applications might want to catch.

See Also:
Serialized Form

Field Summary
protected  Throwable m_throwable
          Nested exception
protected  List mMessageBuffer
          Message Buffer
 
Constructor Summary
UMException()
          This constructor should not be used because it does not reveal any error information to the caller.
UMException(String message)
           
UMException(Throwable nestedException)
          Constructor for PersistenceException wrapping another exception.
UMException(Throwable nestedException, String message)
          Constructor with nested exception and additional explanation text.
 
Method Summary
 void addMessage(IMessage message)
          Adds a message to the message buffer of this exception.
 String getLocalizedMessage()
          Returns the message text of the exception and of all nested exceptions in concatenated form.
 String getMessage()
          The same as getLocalizedMessage(), but using getMessage() first and if nothing delivered from there then using getLocalizedMessage().
 Iterator getMessages(boolean clearPermanentMessages)
          Returns an iterator which contains the IMessage objects assigned to this IPrincipal or null if no messages are assigned.
 Throwable getNestedException()
          Return the nested exception.
static void main(String[] args)
          Quick demonstration how this exception works
 void printStackTrace()
          Print the stack trace and the stack trace of the nested exception (if present) to the error stream.
 void printStackTrace(PrintStream s)
          Write a stack trace to a PrintStream.
 void printStackTrace(PrintWriter s)
          Write a stack trace to a PrintWriter.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_throwable

protected Throwable m_throwable
Nested exception


mMessageBuffer

protected transient List mMessageBuffer
Message Buffer

Constructor Detail

UMException

public UMException(Throwable nestedException,
                   String message)
Constructor with nested exception and additional explanation text.

Parameters:
nestedException - The exception that is wrapped into the PersistenceException.
message - A String with the message of the PersistenceException. Callers should not repeat the message text of the nested exception becasue its message is already printed out automatically.

UMException

public UMException(Throwable nestedException)
Constructor for PersistenceException wrapping another exception.

Parameters:
nestedException - The wrapped exception.

UMException

public UMException(String message)

UMException

public UMException()
This constructor should not be used because it does not reveal any error information to the caller.

Method Detail

addMessage

public void addMessage(IMessage message)
Adds a message to the message buffer of this exception.

Parameters:
message - The message to add at the end of the message buffer.

getNestedException

public Throwable getNestedException()
Return the nested exception.

Returns:
The wrapped exception, or null if there is none.

printStackTrace

public void printStackTrace()
Print the stack trace and the stack trace of the nested exception (if present) to the error stream.

Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace(PrintStream s)
Write a stack trace to a PrintStream.

Overrides:
printStackTrace in class Throwable
Parameters:
s - A PrintStream.

printStackTrace

public void printStackTrace(PrintWriter s)
Write a stack trace to a PrintWriter.

Overrides:
printStackTrace in class Throwable
Parameters:
s - A PrintWriter.

getLocalizedMessage

public String getLocalizedMessage()
Returns the message text of the exception and of all nested exceptions in concatenated form. The message texts of this exception and of the nested exceptions are determined by calling method getLocalizedMessage() on the respective objects. If the method does not return a useful content (which might be the case for faulty implementations of exceptions), then the getMessage() method is used instead. Better any information than no information at all. The concatenation recogminzes if the nested exception starts with the same text as the wrapping exception and in this case removes the duplicate parts. This avoids duplicate appearance of the same message if when filling the UMException the caller fills in a nested exception and uses its texts as the message text for the wrapper itself.

Overrides:
getLocalizedMessage in class Throwable
Returns:
The most information about the exception and the nested exception as possible.

getMessage

public String getMessage()
The same as getLocalizedMessage(), but using getMessage() first and if nothing delivered from there then using getLocalizedMessage().

Overrides:
getMessage in class Throwable
See Also:
getLocalizedMessage()

getMessages

public Iterator getMessages(boolean clearPermanentMessages)
Returns an iterator which contains the IMessage objects assigned to this IPrincipal or null if no messages are assigned. If the method is called with parameter true, every subsequent call will return null if no new message was assigned to this IPrincipal.

Parameters:
clearPermanentMessages - Specifies whether permanent messages with life time IMessage.LIFETIME_PERMANENT should be removed from the message buffer.
Returns:
The messages assigned to this IPrincipal object or null.

main

public static void main(String[] args)
Quick demonstration how this exception works


SAP NetWeaver 7.1 Composition Environment

Copyright © 2007 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.