All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.netscape.certsrv.base.EBaseException

com.netscape.certsrv.base.EBaseException

public class EBaseException
An exception with localizable error messages. It is the base class for all exceptions in certificate server.

See Also:
MessageFormat, BaseResources

Variable Index

 o mParams
Parameters to the exception error message.
 o RESOURCES
The resource bundle to use for error messages.

Constructor Index

 o EBaseException(String)
Constructs an instance of this exception with the given resource key.
 o EBaseException(String, Exception)
Constructs an instance of the exception given the resource key and a exception parameter.
 o EBaseException(String, Object[])
Constructs an instance of this exception given the resource key and an array of parameters.
 o EBaseException(String, String)
Constructs an instance of this exception with the given resource key and a parameter as a string.

Method Index

 o getBundleName()
Returns the given resource bundle name.
 o getParameters()
Returns the list of parameters.
 o toString()
Returns the exception string in the default locale.
 o toString(Locale)
Returns the exception string in the given locale.

Variables

 o RESOURCES
 public static final String RESOURCES
The resource bundle to use for error messages. Subclasses can override to use its own resource bundle.

 o mParams
 public Object mParams[]
Parameters to the exception error message.

Constructors

 o EBaseException
 public EBaseException(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.
 o EBaseException
 public EBaseException(String msgFormat,
                       String param)
Constructs an instance of this exception with the given resource key and a parameter as a string.
      new EBaseException(BaseResource.NO_CONFIG_FILE, fileName);
 

Parameters:
msgFormat - exception details in message string format
param - message string parameter
 o EBaseException
 public EBaseException(String msgFormat,
                       Exception param)
Constructs an instance of the exception given the resource key and a exception parameter.
 		try {
  		...
 		} catch (IOExeption e) {
 		 	throw new EBaseException(BaseResources.INTERNAL_ERROR_1, e);
      }
 

Parameters:
msgFormat - The resource key
exception - The parameter as an exception
 o EBaseException
 public EBaseException(String msgFormat,
                       Object params[])
Constructs an instance of this exception given the resource key and an array of parameters.

Parameters:
msgFormat - The resource key
params - Array of params

Methods

 o getParameters
 public Object[] getParameters()
Returns the list of parameters.

Returns:
List of parameters.
 o toString
 public String toString()
Returns the exception string in the default locale.

Returns:
The exception string in the default locale.
 o toString
 public String toString(Locale locale)
Returns the exception string in the given locale.

Parameters:
locale - The locale
Returns:
The exception string in the given locale.
 o getBundleName
 protected String getBundleName()
Returns the given resource bundle name.

Returns:
the name of the resource bundle for this class.

All Packages  Class Hierarchy  This Package  Previous  Next  Index