Package java.sql

Examples of java.sql.SQLException.initCause()


                in.close();
            }
        } catch (IOException e) {
            SQLException exception =
                new SQLException("Failed to parse bundle " + id);
            exception.initCause(e);
            throw exception;
        }
    }

    /**
 
View Full Code Here


                in.close();
            }
        } catch (IOException e) {
            SQLException exception =
                new SQLException("Failed to parse bundle " + id);
            exception.initCause(e);
            throw exception;
        }
    }

    /**
 
View Full Code Here

            }
          }
        }
      } catch (StringIndexOutOfBoundsException oobEx) {
        SQLException sqlEx = new SQLException("Parse error for " + sql);
        sqlEx.initCause(oobEx);

        throw sqlEx;
      }
     
     
View Full Code Here

                .getCharsetIndexForMysqlEncodingName(mysqlEncodingName);
          } catch (SQLException ex) {
            throw ex;
          } catch (RuntimeException ex) {
            SQLException sqlEx = SQLError.createSQLException(ex.toString(), SQLError.SQL_STATE_ILLEGAL_ARGUMENT, null);
            sqlEx.initCause(ex);
            throw sqlEx;
          }
        }

        Field parameterMetadata = new Field(null, "parameter_"
View Full Code Here

        extensionList.add(extensionInstance);
      }
    } catch (Throwable t) {
      SQLException sqlEx = SQLError.createSQLException(Messages
          .getString(errorMessageKey, new Object[] { className }), exceptionInterceptor);
      sqlEx.initCause(t);

      throw sqlEx;
    }

    return extensionList;
View Full Code Here

   
    try {
      this.regexP = Pattern.compile(regexFromUser);
    } catch (Throwable t) {
      SQLException sqlEx = new SQLException("Can't use configured regex due to underlying exception.");
      sqlEx.initCause(t);
     
      throw sqlEx;
    }
   
  }
View Full Code Here

         
          if (sqlEx != null) {
            SQLException batchUpdateException = new java.sql.BatchUpdateException(sqlEx
                .getMessage(), sqlEx.getSQLState(), sqlEx
                .getErrorCode(), updateCounts);
            batchUpdateException.initCause(sqlEx);
            throw batchUpdateException;
          }
         
          return updateCounts;
        } finally {
View Full Code Here

 
          if (sqlEx != null) {
            SQLException batchUpdateException = new java.sql.BatchUpdateException(sqlEx
                .getMessage(), sqlEx.getSQLState(), sqlEx
                .getErrorCode(), updateCounts);
            batchUpdateException.initCause(sqlEx);
            throw batchUpdateException;
          }

          for (int j = 0; j < this.batchedArgs.size(); j++) {
            updateCounts[j] = updateCountRunningTotal;
View Full Code Here

                      newUpdateCounts, 0, batchCommandIndex);
   
                  SQLException batchUpdateException = new java.sql.BatchUpdateException(ex
                      .getMessage(), ex.getSQLState(), ex
                      .getErrorCode(), newUpdateCounts);
                  batchUpdateException.initCause(ex);
                  throw batchUpdateException;
                }
              }
            }
          }
View Full Code Here

          }
   
          if (sqlEx != null) {
            SQLException batchUpdateException = new java.sql.BatchUpdateException(sqlEx.getMessage(),
                sqlEx.getSQLState(), sqlEx.getErrorCode(), updateCounts);
            batchUpdateException.initCause(sqlEx);
            throw batchUpdateException;
          }
        } catch (NullPointerException npe) {
          try {
            checkClosed();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.