org.springframework.jdbc
Class SQLWarningException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.dao.DataAccessException
org.springframework.dao.NonTransientDataAccessException
org.springframework.dao.UncategorizedDataAccessException
org.springframework.jdbc.SQLWarningException
- All Implemented Interfaces:
- java.io.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(java.lang.String msg,
java.sql.SQLWarning ex)
Constructor for SQLWarningException. |
Method Summary |
java.sql.SQLWarning |
SQLWarning()
Return the underlying SQLWarning. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SQLWarningException
public SQLWarningException(java.lang.String msg,
java.sql.SQLWarning ex)
- Constructor for SQLWarningException.
- Parameters:
msg
- the detail messageex
- the JDBC warning
SQLWarning
public java.sql.SQLWarning SQLWarning()
- Return the underlying SQLWarning.