List of usage examples for java.sql SQLWarning SQLWarning
public SQLWarning(String reason, Throwable cause)
SQLWarning
object with a given reason
and cause
. From source file:com.axibase.tsd.driver.jdbc.strategies.Consumer.java
private static void fillWarnings(List<WarningSection> warningSections, StatementContext context) { if (warningSections != null) { for (AtsdExceptionRepresentation section : warningSections) { SQLWarning sqlw = new SQLWarning(section.getMessage(), section.getState()); List<StackTraceElement> list = getStackTrace(section); sqlw.setStackTrace(list.toArray(new StackTraceElement[list.size()])); context.addWarning(sqlw);/*from w w w. ja v a 2 s . com*/ } } }