Package org.springframework.jdbc
Class SQLWarningException
- All Implemented Interfaces:
Serializable
public class SQLWarningException extends UncategorizedDataAccessException
Exception thrown when we're not ignoringSQLWarnings
.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
Constructors Constructor Description SQLWarningException(String msg, SQLWarning ex)
Constructor for SQLWarningException.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SQLWarning
SQLWarning()
Return the underlying SQLWarning.Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Constructor Detail
SQLWarningException
public SQLWarningException(String msg, SQLWarning ex)
Constructor for SQLWarningException.- Parameters:
msg
- the detail messageex
- the JDBC warning
Method Detail
SQLWarning
public SQLWarning SQLWarning()
Return the underlying SQLWarning.