The Spring Framework

org.springframework.jdbc
Class SQLWarningException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.springframework.core.NestedRuntimeException
                  extended by org.springframework.dao.DataAccessException
                      extended by org.springframework.dao.UncategorizedDataAccessException
                          extended by org.springframework.jdbc.SQLWarningException
All Implemented Interfaces:
Serializable

public class SQLWarningException
extends UncategorizedDataAccessException

Exception thrown when we're not ignoring SQLWarnings.

If a SQLWarning is reported, the operation completed, so we will need to explicitly roll it back if we're not happy when looking at the warning. We might choose to ignore (and log) the warning, or to wrap and throw it in the shape of this SQLWarningException instead.

Author:
Rod Johnson, Juergen Hoeller
See Also:
JdbcTemplate.setIgnoreWarnings(boolean), Serialized Form

Constructor Summary
SQLWarningException(String msg, SQLWarning ex)
          Constructor for SQLWarningException.
 
Method Summary
 SQLWarning SQLWarning()
          Return the underlying SQLWarning.
 
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getCause, getMessage, getMostSpecificCause, getRootCause, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLWarningException

public SQLWarningException(String msg,
                           SQLWarning ex)
Constructor for SQLWarningException.

Parameters:
msg - the detail message
ex - the JDBC warning
Method Detail

SQLWarning

public SQLWarning SQLWarning()
Return the underlying SQLWarning.


The Spring Framework

Copyright © 2002-2007 The Spring Framework.