ResultSet rs = statement.executeQuery(); if (rs == null) throw new Failure("getNames failed: returning null"); Set<HashId> result = new HashSet<>(); while (rs.next()) { throw new Failure("saveEnvironment_getConflicts failed: " + se); } catch (Exception e) { e.printStackTrace(); throw new Failure("saveEnvironment_getConflicts failed: " + e);
failure.printStackTrace(); log.e(failure.getMessage());
throw new Failure("config save failed:" + se); } catch (Exception e) { e.printStackTrace();
throw new Failure("saveContractInStorage binary failed: " + se); } catch (Exception e) { e.printStackTrace(); ResultSet rs = statement.executeQuery(); if (rs == null) throw new Failure("saveContractInStorage failed: returning null"); rs.next(); long resId = rs.getLong(1); throw new Failure("saveContractInStorage failed: " + se); } catch (Exception e) { e.printStackTrace();
} catch (SQLException e) { e.printStackTrace(); throw new Failure("isAllAddressesAvailable failed: " + e); ResultSet rs = statement.executeQuery(); if (rs == null) throw new Failure("isAllAddressesAvailable failed: returning null"); List<String> res = new ArrayList<>(); while (rs.next()) { throw new Failure("isAllAddressesAvailable failed: " + se); } catch (Exception e) { e.printStackTrace(); throw new Failure("isAllAddressesAvailable failed: " + e);
throw new Failure("StateRecord save failed:" + se); } catch (Exception e) { e.printStackTrace();
} catch (SQLException e) { e.printStackTrace(); throw new Failure("findBadReferencesOf failed: " + e); ResultSet rs = statement.executeQuery(); if (rs == null) throw new Failure("findBadReferencesOf failed: returning null"); Set<HashId> res = new HashSet<>(ids); while (rs.next()) { throw new Failure("isNameRecordBusy failed: " + se); } catch (Exception e) { e.printStackTrace(); throw new Failure("isNameRecordBusy failed: " + e);
} catch (SQLException e) { e.printStackTrace(); throw new Failure("isNameRecordBusy failed: " + e); ResultSet rs = statement.executeQuery(); if (rs == null) throw new Failure("isNameRecordBusy failed: returning null"); List<String> res = new ArrayList<>(); while (rs.next()) { throw new Failure("isNameRecordBusy failed: " + se); } catch (Exception e) { e.printStackTrace(); throw new Failure("isNameRecordBusy failed: " + e);
throw new Ledger.Failure("StateRecord save failed:" + se);
} catch (SQLException e) { e.printStackTrace(); throw new Failure("isAllOriginsAvailable failed: " + e); ResultSet rs = statement.executeQuery(); if (rs == null) throw new Failure("isAllOriginsAvailable failed: returning null"); List<String> res = new ArrayList<>(); while (rs.next()) { throw new Failure("isAllOriginsAvailable failed: " + se); } catch (Exception e) { e.printStackTrace(); throw new Failure("isAllOriginsAvailable failed: " + e);
ResultSet rs = statement.executeQuery(); if (rs == null) throw new Failure("addNameStorage failed: returning null"); rs.next(); long resId = rs.getLong(1); throw new Failure("addNameStorage failed: " + se); } catch (Exception e) { e.printStackTrace(); throw new Failure("addNameStorage failed: " + e);
ResultSet rs = statement.executeQuery(); if (rs == null) throw new Failure("getFollowerCallbacksToResyncByEnvId failed: returning null"); List<CallbackRecord> res = new ArrayList<>(); while (rs.next()) { throw new Failure("getFollowerCallbacksToResyncByEnvId failed: " + se); } catch (Exception e) { e.printStackTrace(); throw new Failure("getFollowerCallbacksToResyncByEnvId failed: " + e);
ResultSet rs = statement.executeQuery(); if (rs == null) throw new Failure("getFollowerCallbacksToResync failed: returning null"); List<CallbackRecord> res = new ArrayList<>(); while (rs.next()) { throw new Failure("getFollowerCallbacksToResync failed: " + se); } catch (Exception e) { e.printStackTrace(); throw new Failure("getFollowerCallbacksToResync failed: " + e);
ResultSet rs = statement.executeQuery(); if (rs == null) throw new Failure("getNames failed: returning null"); List<String> res = new ArrayList<>(); while (rs.next()) { throw new Failure("getNames failed: " + se); } catch (Exception e) { e.printStackTrace(); throw new Failure("getNames failed: " + e);
ResultSet rs = statement.executeQuery(); if (rs == null) throw new Failure("getContractSubscriptions failed: returning null"); List<ContractSubscription> res = new ArrayList<>(); while (rs.next()) { throw new Failure("getContractSubscriptions failed: " + se); } catch (Exception e) { e.printStackTrace(); throw new Failure("getContractSubscriptions failed: " + e);
ResultSet rs = statement.executeQuery(); if (rs == null) throw new Failure("addEnvironmentToStorage failed: returning null"); rs.next(); long resId = rs.getLong(1); throw new Failure("addEnvironmentToStorage failed: " + se); } catch (Exception e) { e.printStackTrace(); throw new Failure("addEnvironmentToStorage failed: " + e);
ResultSet rs = statement.executeQuery(); if (rs == null) throw new Failure("getContractStorages failed: returning null"); List<ContractStorage> res = new ArrayList<>(); while (rs.next()) { throw new Failure("getContractStorages failed: " + se); } catch (Exception e) { e.printStackTrace(); throw new Failure("getContractStorages failed: " + e);
@Override public void putKeepingItem(StateRecord record, Approvable item) { if (item instanceof Contract) { try (PooledDb db = dbPool.db()) { try ( PreparedStatement statement = db.statement( "insert into keeping_items (id,hash,origin,packed) values(?,?,?,?);" ) ) { if (record != null) statement.setLong(1, record.getRecordId()); else statement.setNull(1, Types.INTEGER); statement.setBytes(2, ((Contract) item).getId().getDigest()); statement.setBytes(3, ((Contract) item).getOrigin().getDigest()); statement.setBytes(4, ((Contract) item).getPackedTransaction()); db.updateWithStatement(statement); } catch (Exception e) { e.printStackTrace(); throw e; } } catch (SQLException se) { se.printStackTrace(); throw new Failure("keeping item save failed:" + se); } catch (Exception e) { e.printStackTrace(); } } }