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 OIMGenericExceptionIntf |
copyErrorCodeAndData(java.lang.Throwable e1, OIMGenericExceptionIntf e2)
Extracts the error code and error data from the error message in exception e1 and stores it in exception e2. |
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. |
static java.lang.String |
getMessage(java.util.List resourceBundleNames, java.lang.Exception e, java.lang.Object[] arguments)
This method gives a formatted localized message form the exception using the provided set of resource bundles 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.util.List resourceBundleNames,
java.lang.Exception e,
java.lang.Object[] arguments)
- This method gives a formatted localized message form the exception using the provided set of resource bundles 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:
resourceBundleNames - The set of names of the resource bundles. The set could be have 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
e - exception
arguments - For tcAPIException, pass the additional arguments if necessary
- Returns:
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
copyErrorCodeAndData
public static OIMGenericExceptionIntf copyErrorCodeAndData(java.lang.Throwable e1,
OIMGenericExceptionIntf e2)
- Extracts the error code and error data from the error message in exception e1 and stores it in exception e2.
-
- Parameters:
e1 - Throable whose error message is to be parsed.
e2 - OIMGenericExceptionIntf into which the extracted error code and error parameters are to be set.
- Returns:
- the exception after setting the error code and error parameters
Skip navigation links
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.