com.sap.security.api
Class UMException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.sap.security.api.UMException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AttributeValueAlreadyExistsException, AuthenticationFailedException, InvalidIDException, InvalidLogonIdException, InvalidPasswordException, NoLogonDataAvailableException, NoSuchPrincipalException, ObjectAlreadyExistsException, PrincipalAlreadyExistsException, SearchResultSizeLimitExceededException, UserLockedException

public class UMException
extends java.lang.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.

Version:
2.0
See Also:
Serialized Form

Constructor Summary
UMException()
          This constructor should not be used because it does not reveal any error information to the caller.
UMException(java.lang.String message)
           
UMException(java.lang.Throwable nestedException)
          Constructor for PersistenceException wrapping another exception.
UMException(java.lang.Throwable nestedException, java.lang.String message)
          Constructor with nested exception and additional explanation text.
 
Method Summary
 java.lang.String getLocalizedMessage()
          Returns the message text of the exception and of all nested exceptions in concatenated form.
 java.lang.String getMessage()
          The same as getLocalizedMessage(), but using getMessage() first and if nothing delivered from there then using getLocalizedMessage().
 java.lang.Throwable getNestedException()
          Return the nested exception.
static void main(java.lang.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(java.io.PrintStream s)
          Write a stack trace to a PrintStream.
 void printStackTrace(java.io.PrintWriter s)
          Write a stack trace to a PrintWriter.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UMException

public UMException(java.lang.Throwable nestedException,
                   java.lang.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(java.lang.Throwable nestedException)
Constructor for PersistenceException wrapping another exception.
Parameters:
nestedException - The wrapped exception.

UMException

public UMException(java.lang.String message)

UMException

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

getNestedException

public java.lang.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 java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Write a stack trace to a PrintStream.
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - A PrintStream.

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Write a stack trace to a PrintWriter.
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - A PrintWriter.

getLocalizedMessage

public java.lang.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 java.lang.Throwable
Returns:
The most information about the exception and the nested exception as possible.

getMessage

public java.lang.String getMessage()
The same as getLocalizedMessage(), but using getMessage() first and if nothing delivered from there then using getLocalizedMessage().
Overrides:
getMessage in class java.lang.Throwable
See Also:
getLocalizedMessage()

main

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


Copyright © 2002 SAP AG All Rights Reserved.