Skip navigation links
oracle.iam.platformservice.utils
Class ExceptionHandlingUtility
java.lang.Object
oracle.iam.platformservice.utils.ExceptionHandlingUtility
-
public class ExceptionHandlingUtility
- extends java.lang.Object
Method Summary |
static java.lang.String |
extractErrorMessage(java.lang.String message)
Extracts the error message from the provided message. |
static java.lang.String |
getMessage(java.lang.Exception e, java.lang.Object[] arguments)
Returns the localized message from the system bundles using the error code in the exception. |
static java.lang.String |
getMessage(java.lang.Exception e, java.lang.String resourceBundleName, java.lang.Object[] arguments)
This method gives a formatted localized message form the exception using the provided resource bundle For tcAPIException, pass the additional arguments if necessary If the exception is not a tcAPIException and not of type OIMGenericException it looks into the localized message and expect it to include the information of error code, bundle and parameters eg. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExceptionHandlingUtility
public ExceptionHandlingUtility()
getMessage
public static java.lang.String getMessage(java.lang.Exception e,
java.lang.String resourceBundleName,
java.lang.Object[] arguments)
- This method gives a formatted localized message form the exception using the provided resource bundle For tcAPIException, pass the additional arguments if necessary If the exception is not a tcAPIException and not of type OIMGenericException it looks into the localized message and expect it to include the information of error code, bundle and parameters eg. IAM-1234567::xlWebAdmin::1,2,3 IAM-1234567::oracle/iam/features/scheduler/agentry/resources/Agent::1,2,3
-
- Parameters:
e
- exception
resourceBundleName
- Name of the resource bundle. This could be the system bundle names like xlWebAdmin or xlDefaultAdmin or the path of an already loaded bundle by the classloader eg. oracle/iam/request/agentry/resources/Agent
arguments
- For tcAPIException, pass the additional arguments if necessary
- Returns:
getMessage
public static java.lang.String getMessage(java.lang.Exception e,
java.lang.Object[] arguments)
- Returns the localized message from the system bundles using the error code in the exception. For tcAPIException, pass the additional arguments if necessary
-
- Parameters:
e
-
arguments
- For tcAPIException, pass the additional arguments if necessary
- Returns:
- formatted localized message from the system resource bundles
extractErrorMessage
public static java.lang.String extractErrorMessage(java.lang.String message)
- Extracts the error message from the provided message. Expects the passed message to be in a specific format to return the correct value from the appropriate bundle. The format is: Error-Code::Resource-Bundle-Name::argument1,argument2,argument3... Examples: IAM-0001234::xlWebAdmin IAM-0001234::xlDefaultAdmin::44,45 or, the format is: Error-Code:Resource-Bundle-Name:argument1,argument2,argument3... Examples: IAM-0001234:xlWebAdmin IAM-0001234:xlDefaultAdmin:44,45
-
- Parameters:
message
- Message in the expected format
- Returns:
- Formatted message from the resource bundle with the optional arguments
Skip navigation links
Copyright © 2010, Oracle and/or its affiliates. All rights reserved.