uk.ac.ic.doc.automed.wrappers
Class DataSourceException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by uk.ac.ic.doc.automed.AutoMedException
              extended by uk.ac.ic.doc.automed.wrappers.DataSourceException
All Implemented Interfaces:
java.io.Serializable

public class DataSourceException
extends AutoMedException

Generated when some problem occurs when accessing a data source, such as the wrong password being supplied.

Author:
Peter McBrien (pjm@doc.ic.ac.uk)
See Also:
Serialized Form

Constructor Summary
DataSourceException(java.lang.String msg)
          Creates an DataSourceException when there has been no Exception that caused the error to discovered.
DataSourceException(java.lang.String msg, java.lang.Exception e)
          Creates an DataSourceException when it is acting as a wrapper for other Exceptions.
 
Method Summary
static DataSourceException newDataSourceException(java.lang.String msg, java.lang.Exception e)
          Create a new DataSourceException only if necessary.
 
Methods inherited from class uk.ac.ic.doc.automed.AutoMedException
getCause, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataSourceException

public DataSourceException(java.lang.String msg)
Creates an DataSourceException when there has been no Exception that caused the error to discovered.

Parameters:
msg - message for the exception.

DataSourceException

public DataSourceException(java.lang.String msg,
                           java.lang.Exception e)
Creates an DataSourceException when it is acting as a wrapper for other Exceptions.

Parameters:
msg - message for the exception.
Method Detail

newDataSourceException

public static DataSourceException newDataSourceException(java.lang.String msg,
                                                         java.lang.Exception e)
Create a new DataSourceException only if necessary.

Parameters:
msg - message of new exception if generated.
e - exception that caused this exception to be generated
Returns:
e if it is an DataSourceException, otherwise a new DataSourceException containing msg and e.