Example usage for java.sql SQLWarning SQLWarning

List of usage examples for java.sql SQLWarning SQLWarning

Introduction

In this page you can find the example usage for java.sql SQLWarning SQLWarning.

Prototype

public SQLWarning(String reason, Throwable cause) 

Source Link

Document

Constructs a SQLWarning object with a given reason and cause.

Usage

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*/
        }
    }
}