Examples of rethrow()


Examples of com.google.common.io.Closer.rethrow()

    } catch (NoSuchAlgorithmException e) {
      throw new RuntimeException("integrity check algorithm is unavailable", e);
    } catch (IOException e) {
      throw new RuntimeException("I/O error or a bad password", e);
    } catch (Throwable e) { // Prescribed Closer pattern.
      throw closer.rethrow(e);
    } finally {
      closer.close();
    }
    return keyStore;
  }
View Full Code Here

Examples of com.google.common.io.Closer.rethrow()

                    out.append(m.getConfig().getName()).append('\t')
                       .append(m.getConfig().getTags().toString()).append('\t')
                       .append(m.getValue().toString()).append('\n');
                }
            } catch (Throwable t) {
                throw closer.rethrow(t);
            } finally {
                closer.close();
            }
        } catch (IOException e) {
            incrementFailedCount();
View Full Code Here

Examples of com.google.common.io.Closer.rethrow()

        String h = "backup { /path/to/oak/repository | mongodb://host:port/database } <path/to/backup>";
        try {
            NodeStore store = bootstrapNodeStore(args, closer, h);
            FileStoreBackup.backup(store, new File(args[1]));
        } catch (Throwable e) {
            throw closer.rethrow(e);
        } finally {
            closer.close();
        }
    }
View Full Code Here

Examples of com.google.common.io.Closer.rethrow()

        String h = "restore { /path/to/oak/repository | mongodb://host:port/database } <path/to/backup>";
        try {
            NodeStore store = bootstrapNodeStore(args, closer, h);
            FileStoreRestore.restore(new File(args[1]), store);
        } catch (Throwable e) {
            throw closer.rethrow(e);
        } finally {
            closer.close();
        }
    }
View Full Code Here

Examples of com.google.common.io.Closer.rethrow()

            CloseableIterable<NodeDocument> docs = seeker.getCandidates(0);
            closer.register(docs);
            boolean dryRun = Arrays.asList(args).contains("dryRun");
            agent.recover(docs.iterator(), dns.getClusterId(), dryRun);
        } catch (Throwable e) {
            throw closer.rethrow(e);
        } finally {
            closer.close();
        }
    }
View Full Code Here

Examples of com.google.common.io.Closer.rethrow()

            }
            throw new BuildException(message.toString());
        }
      }
    } catch (Throwable t) {
      throw closer.rethrow(t);
    } finally {
      try {
        closer.close();
      } finally {
        Files.asByteSource(classNamesDynamic).copyTo(Files.asByteSink(classNamesFile, FileWriteMode.APPEND));
View Full Code Here

Examples of com.google.common.io.Closer.rethrow()

            input.skipValue();
        }
        input.endArray();
      }
    } catch (Throwable t) {
      throw closer.rethrow(t);
    } finally {
      closer.close();
    }
  }
}
View Full Code Here

Examples of com.google.common.io.Closer.rethrow()

        w.write("=");
        joiner.appendTo(w, e.getValue());
        w.write("\n");
      }
    } catch (Throwable t) {
      throw closer.rethrow(t);
    } finally {
      closer.close();
    }
  }
View Full Code Here

Examples of com.google.common.io.Closer.rethrow()

            }
            throw new BuildException(message.toString());
        }
      }
    } catch (Throwable t) {
      throw closer.rethrow(t);
    } finally {
      try {
        closer.close();
      } finally {
        Files.asByteSource(classNamesDynamic).copyTo(Files.asByteSink(classNamesFile, FileWriteMode.APPEND));
View Full Code Here

Examples of com.google.common.io.Closer.rethrow()

      InputStream inputStream = closer.register(inputStreamSupplier.getInput());
      KeyStore keyStore = KeyStore.getInstance("JKS");
      keyStore.load(inputStream, KEYSTORE_PASSWORD);
      return keyStore;
    } catch (Throwable e) {
      throw closer.rethrow(e);
    } finally {
      closer.close();
    }
  }
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.