Example usage for org.apache.lucene.util IOUtils reThrowUnchecked

List of usage examples for org.apache.lucene.util IOUtils reThrowUnchecked

Introduction

In this page you can find the example usage for org.apache.lucene.util IOUtils reThrowUnchecked.

Prototype

@Deprecated
public static void reThrowUnchecked(Throwable th) 

Source Link

Usage

From source file:com.core.nlp.index.IndexReader.java

License:Apache License

private void notifyReaderClosedListeners(Throwable th) {
    synchronized (readerClosedListeners) {
        for (ReaderClosedListener listener : readerClosedListeners) {
            try {

            } catch (Throwable t) {
                if (th == null) {
                    th = t;/*from   ww  w.  j  a  v  a2s.c o  m*/
                } else {
                    th.addSuppressed(t);
                }
            }
        }
        IOUtils.reThrowUnchecked(th);
    }
}

From source file:org.elasticsearch.painless.Debugger.java

License:Apache License

/** compiles to bytecode, and returns debugging output */
static String toString(String source, CompilerSettings settings) {
    StringWriter output = new StringWriter();
    PrintWriter outputWriter = new PrintWriter(output);
    Textifier textifier = new Textifier();
    try {/* w ww .j  a v  a  2s  .  c om*/
        Compiler.compile("<debugging>", source, settings, textifier);
    } catch (Exception e) {
        textifier.print(outputWriter);
        e.addSuppressed(new Exception("current bytecode: \n" + output));
        IOUtils.reThrowUnchecked(e);
        throw new AssertionError();
    }

    textifier.print(outputWriter);
    return output.toString();
}