Package com.xiaoleilu.hutool.exceptions

Examples of com.xiaoleilu.hutool.exceptions.DbRuntimeException


    String driver = null;
    try {
      conn = ds.getConnection();
      driver = identifyDriver(conn);
    } catch (Exception e) {
      throw new DbRuntimeException("Identify driver error!", e);
    }finally {
      close(conn);
    }
   
    return driver;
View Full Code Here


      driver =  identifyDriver(meta.getDatabaseProductName());
      if(StrUtil.isBlank(driver)) {
        driver =  identifyDriver(meta.getDriverName());
      }
    } catch (SQLException e) {
      throw new DbRuntimeException("Identify driver error!", e);
    }
   
    return driver;
  }
View Full Code Here

   */
  public Session(DataSource ds) {
    try {
      this.conn = ds.getConnection();
    } catch (SQLException e) {
      throw new DbRuntimeException("Get connection error!", e);
    }
    this.runner = new SqlConnRunner(DialectFactory.newDialect(conn));
  }
View Full Code Here

    this.pass = pass;
    this.driver = DbUtil.identifyDriver(url);
    try {
      Class.forName(this.driver);
    } catch (ClassNotFoundException e) {
      throw new DbRuntimeException(e, "Get jdbc driver from [{}] error!", url);
    }
  }
View Full Code Here

TOP

Related Classes of com.xiaoleilu.hutool.exceptions.DbRuntimeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.