Package com.netscape.certsrv.base
Class EBaseException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.netscape.certsrv.base.EBaseException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
BadRequestDataException
,EACLsException
,EAuthException
,EAuthzException
,ECAException
,ECMSGWException
,EDBException
,EExtensionsException
,EJobsException
,EKRAException
,ELdapException
,EListenersException
,ELogException
,ENotificationException
,EPasswordCheckException
,EPolicyException
,EProfileException
,EPropertyException
,EPropertyNotDefined
,EPropertyNotFound
,ERegistryException
,ESelfTestException
,EUsrGrpException
,PolicyMessage
,TPSException
public class EBaseException extends java.lang.Exception
An exception with localizable error messages. It is the base class for all exceptions in certificate server.- Version:
- $Revision$, $Date$
- See Also:
MessageFormat
,BaseResources
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.Object[]
mParams
Parameters to the exception error message.
-
Constructor Summary
Constructors Constructor Description EBaseException(java.lang.Exception cause)
Constructs an instance of this exception given the cause exception.EBaseException(java.lang.String msgFormat)
Constructs an instance of this exception with the given resource key.EBaseException(java.lang.String msgFormat, java.lang.Object[] params)
Constructs an instance of this exception given the resource key and an array of parameters.EBaseException(java.lang.String msgFormat, java.lang.Object[] params, java.lang.Exception cause)
Constructs an instance of this exception given the resource key, an array of parameters, and the cause exception.EBaseException(java.lang.String msgFormat, java.lang.Throwable cause)
Constructs an instance of this exception given the resource key and the cause exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getBundleName()
Returns the given resource bundle name.java.lang.Object[]
getParameters()
Returns the list of parameters.java.lang.String
toString()
Returns the exception string in the default locale.java.lang.String
toString(java.util.Locale locale)
Returns the exception string in the given locale.
-
-
-
Constructor Detail
-
EBaseException
public EBaseException(java.lang.String msgFormat)
Constructs an instance of this exception with the given resource key. If resource key is not found in the resource bundle, the resource key specified is used as the error message.new EBaseException(BaseResources.PERMISSION_DENIED); new EBaseException("An plain error message");
- Parameters:
msgFormat
- The error message resource key.
-
EBaseException
public EBaseException(java.lang.String msgFormat, java.lang.Throwable cause)
Constructs an instance of this exception given the resource key and the cause exception.try { ... } catch (IOExeption e) { throw new EBaseException(BaseResources.INTERNAL_ERROR_1, e); }
- Parameters:
msgFormat
- The resource keycause
- The cause exception
-
EBaseException
public EBaseException(java.lang.String msgFormat, java.lang.Object[] params)
Constructs an instance of this exception given the resource key and an array of parameters.- Parameters:
msgFormat
- The resource keyparams
- Array of params
-
EBaseException
public EBaseException(java.lang.String msgFormat, java.lang.Object[] params, java.lang.Exception cause)
Constructs an instance of this exception given the resource key, an array of parameters, and the cause exception.- Parameters:
msgFormat
- The resource keyparams
- Array of paramscause
- The cause exception
-
EBaseException
public EBaseException(java.lang.Exception cause)
Constructs an instance of this exception given the cause exception.try { ... } catch (IOExeption e) { throw new EBaseException(e); }
- Parameters:
cause
- The cause exception
-
-
Method Detail
-
getParameters
public java.lang.Object[] getParameters()
Returns the list of parameters.- Returns:
- List of parameters.
-
toString
public java.lang.String toString()
Returns the exception string in the default locale.- Overrides:
toString
in classjava.lang.Throwable
- Returns:
- The exception string in the default locale.
-
toString
public java.lang.String toString(java.util.Locale locale)
Returns the exception string in the given locale.- Parameters:
locale
- The locale- Returns:
- The exception string in the given locale.
-
getBundleName
protected java.lang.String getBundleName()
Returns the given resource bundle name.- Returns:
- the name of the resource bundle for this class.
-
-