Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Web Services Manager
11g (11.1.1)

E10689-01


oracle.wsm.common.exception
Class BaseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by oracle.wsm.common.exception.BaseException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AdvertisementException, AuditException, CommonUtilException, CompatibilityCheckException, LegacyPolicyFeatureNotSupportedException, MDSAccessException, MonitorException, PolicyAccessException, PolicyManagerException, PolicyModelException, PolicyParseFailedException, PolicySerializationFailedException, SecurityException, WSMException, XMLException

public class BaseException
extends Exception

WS exception base class that extends from JDK 1.4 java Exception with nested/chained exception handling. All constructor classes enforce the usage of errorCode passing.

Version:
$Revision: /st_owsm/14 $
Author:
Cecilia Zhao
See Also:
Serialized Form

Field Summary
protected  Object[] m_arguments
          Arguments to the error message
protected  String m_bundleType
          Message Bundle Type
protected  String m_errorCode
          the error code in the format of TBD

 

Constructor Summary
BaseException(String errorCode)
          To create an exception with a predefined component-based error code.
BaseException(String errorCode, Object[] args)
          To create an exception with a predefined component-based error code and an array of argument values that will be formated according to errorCode's corresponding message string.
BaseException(String errorCode, Object[] args, Throwable cause)
          To create an exception with a predefined component-based error code and an array of argument values that will be formated according to errorCode's corresponding message string, plus the parent cause of the exception.
BaseException(String errorCode, Throwable cause)
          To create an exception with a predefined component-based error code and a parent cause (an Exception or Throwable).
BaseException(Throwable cause)
          To create an exception without error code but the parent cause, an exception or Throwable.

 

Method Summary
 Object[] getArguments()
          Get an array of argument objects of this exception
 String getErrorCode()
          Get the error code of this exception
 String getLocalizedMessage()
          To get the localized error message of this class with default locale.
 String getLocalizedMessage(Locale currentLocale)
          Gets the localized error message that led to the exception corresponding to the given errorCode.
 String getMessage()
          To get the localized error message of this class with default locale
protected  void setBundleType(String bundleType)
           

 

Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

m_errorCode

protected String m_errorCode
the error code in the format of TBD

m_arguments

protected Object[] m_arguments
Arguments to the error message

m_bundleType

protected String m_bundleType
Message Bundle Type

Constructor Detail

BaseException

public BaseException(String errorCode)
To create an exception with a predefined component-based error code. The errorCode should be defined in correspondingMessageCode.java and its corresponding English message should be defined in module specific resouce bundle class
Parameters:
errorCode - The predefined component-base error code

BaseException

public BaseException(Throwable cause)
To create an exception without error code but the parent cause, an exception or Throwable. The parent cause's message will be inheriated.
Parameters:
cause -

BaseException

public BaseException(String errorCode,
                     Object[] args)
To create an exception with a predefined component-based error code and an array of argument values that will be formated according to errorCode's corresponding message string. The errorCode should be defined in correspondingMessageCode.java and its corresponding English message should be defined in ExceptionBundle_en_US.properties
Parameters:
errorCode - The predefined component-based error code defined in corresoibdubgMessageCode.java
args - The array of argument values

BaseException

public BaseException(String errorCode,
                     Throwable cause)
To create an exception with a predefined component-based error code and a parent cause (an Exception or Throwable). The parent cause's message will be inheriated; usually used for Exception conversion to convert a parent cause to BaseException.
Parameters:
errorCode - The predefined component-based error code defined in correspondingMessageCode.java
cause - The parent Throwable

BaseException

public BaseException(String errorCode,
                     Object[] args,
                     Throwable cause)
To create an exception with a predefined component-based error code and an array of argument values that will be formated according to errorCode's corresponding message string, plus the parent cause of the exception. The message of corresponding errorCode is used instead of message on parent casue. This constructor is usually used for exception conversion to convert parent cause to BaseException with new message.
Parameters:
errorCode - The predefined component-based error code defined in correspondingMessageCode.java
args - The array of argument values
cause - The parent Throwable

Method Detail

getArguments

public Object[] getArguments()
Get an array of argument objects of this exception
Returns:
Object[]

getErrorCode

public String getErrorCode()
Get the error code of this exception
Returns:
String -- the predefined component-based error code of this class.

getLocalizedMessage

public String getLocalizedMessage(Locale currentLocale)
Gets the localized error message that led to the exception corresponding to the given errorCode.
Parameters:
currentLocale - - the locale of which the localized error message is requested.
Returns:
String - the localized error message of its corresponding errorCode. It errorCode is null, message of its parent cause will be returned

getLocalizedMessage

public String getLocalizedMessage()
To get the localized error message of this class with default locale.
Overrides:
getLocalizedMessage in class Throwable

getMessage

public String getMessage()
To get the localized error message of this class with default locale
Overrides:
getMessage in class Throwable

setBundleType

protected void setBundleType(String bundleType)

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Web Services Manager
11g (11.1.1)

E10689-01


Copyright © 2007, 2009, Oracle and/or its affiliates. All rights reserved.