org.opencms.db
Class CmsDbSqlException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.opencms.main.CmsException
              extended by org.opencms.file.CmsDataAccessException
                  extended by org.opencms.db.CmsDbException
                      extended by org.opencms.db.CmsDbSqlException
All Implemented Interfaces:
java.io.Serializable, I_CmsThrowable

public class CmsDbSqlException
extends CmsDbException

Used to signal sql related issues.

Since:
6.0.0
Version:
$Revision: 1.14 $
Author:
Michael Moossen
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.opencms.main.CmsException
m_message
 
Constructor Summary
CmsDbSqlException(CmsMessageContainer container)
          Creates a new localized Exception.
CmsDbSqlException(CmsMessageContainer container, java.lang.Throwable cause)
          Creates a new localized Exception that also containes a root cause.
 
Method Summary
 CmsException createException(CmsMessageContainer container, java.lang.Throwable cause)
          Creates a copied instance of this localized exception.
static java.lang.String getErrorQuery(java.sql.Statement stmt)
          Returns the query that let the statement crash.
 
Methods inherited from class org.opencms.main.CmsException
getFormattedErrorstack, getLocalizedMessage, getLocalizedMessage, getMessage, getMessageContainer, getStackTraceAsString
 
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
 

Constructor Detail

CmsDbSqlException

public CmsDbSqlException(CmsMessageContainer container)
Creates a new localized Exception.

Parameters:
container - the localized message container to use

CmsDbSqlException

public CmsDbSqlException(CmsMessageContainer container,
                         java.lang.Throwable cause)
Creates a new localized Exception that also containes a root cause.

Parameters:
container - the localized message container to use
cause - the Exception root cause
Method Detail

getErrorQuery

public static java.lang.String getErrorQuery(java.sql.Statement stmt)
Returns the query that let the statement crash.

Parameters:
stmt - the Statement to get the crashed query from
Returns:
the crashed query

createException

public CmsException createException(CmsMessageContainer container,
                                    java.lang.Throwable cause)
Description copied from class: CmsException
Creates a copied instance of this localized exception.

Overrides:
createException in class CmsDbException
Parameters:
container - the message container
cause - the root cause
Returns:
a copied instance of this localized exception
See Also:
CmsException.createException(org.opencms.i18n.CmsMessageContainer, java.lang.Throwable)