public class TeiidSQLWarning extends SQLWarning
//warning will be an instanceof TeiidSQLWarning to convey model/source information
SQLWarning warning = stmt.getWarnings();
while (warning != null) {
Exception e = warning.getCause();
if (cause instanceof SQLWarning) {
//childWarning should now be the head of the source warning chain
SQLWarning childWarning = (SQLWarning)cause;
while (childWarning != null) {
//do something with childWarning
childWarning = childWarning.getNextWarning();
}
}
warning = warning.getNextWarning();
}
| Constructor and Description |
|---|
TeiidSQLWarning() |
TeiidSQLWarning(String reason) |
TeiidSQLWarning(String reason,
String state) |
TeiidSQLWarning(String reason,
String sqlState,
int errorCode,
Throwable ex) |
TeiidSQLWarning(String reason,
String sqlState,
Throwable ex,
String sourceName,
String modelName) |
| Modifier and Type | Method and Description |
|---|---|
String |
getModelName() |
String |
getSourceName() |
getNextWarning, setNextWarninggetErrorCode, getNextException, getSQLState, iterator, setNextExceptionaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorCopyright © 2019. All rights reserved.