@Override public void assertHealthy() { if ( panic != null ) { throwIfUnchecked( panic ); throw new RuntimeException( panic ); } }
/** * Halts this flusher, making it stop flushing. The current call to {@link PageCache#flushAndForce()} * will complete before exiting this method call. If there was an error in the thread doing the flushes * that exception will be thrown from this method as a {@link RuntimeException}. */ void halt() { halted = true; halt.await(); if ( error != null ) { throwIfUnchecked( error ); throw new RuntimeException( error ); } } }
private void closeAndThrow( Exception e ) { if ( pagedFile != null ) { try { closeStoreFile(); } catch ( IOException failureToClose ) { // Not really a suppressed exception, but we still want to throw the real exception, e, // but perhaps also throw this in there or convenience. e.addSuppressed( failureToClose ); } } throwIfUnchecked( e ); throw new RuntimeException( e ); }
@Override public void assertHealthy() { if ( panic != null ) { throwIfUnchecked( panic ); throw new RuntimeException( panic ); } }
private RuntimeException exitConstructor( Throwable throwable ) { try { close(); } catch ( IOException e ) { throwable = Exceptions.chain( new UncheckedIOException( e ), throwable ); } appendTreeInformation( throwable ); Exceptions.throwIfUnchecked( throwable ); return new RuntimeException( throwable ); }
@Override public IndexSample sampleIndex() throws IndexNotFoundKernelException { List<IndexSample> samples = new ArrayList<>(); Exception exception = null; for ( IndexSampler sampler : samplers ) { try { samples.add( sampler.sampleIndex() ); } catch ( IndexNotFoundKernelException | RuntimeException e ) { exception = Exceptions.chain( exception, e ); } } if ( exception != null ) { Exceptions.throwIfUnchecked( exception ); throw (IndexNotFoundKernelException)exception; } return combineSamples( samples ); }
if ( finalError != null ) Exceptions.throwIfUnchecked( finalError ); throw new RuntimeException( finalError );
throwIfUnchecked( e ); return new RuntimeException( e ); // throw in order to have process exit with !0
throwIfUnchecked( e ); throw new RuntimeException( e );
@Override public void assertHealthy() { if ( panic != null ) { throwIfUnchecked( panic ); throw new RuntimeException( panic ); } }
/** * @deprecated look at usage sites and replace with the proper replacements * according to https://goo.gl/Ivn2kc */ @Deprecated public static void throwUnchecked(final Throwable exception) { Exceptions.throwIfUnchecked(exception); throw new RuntimeException(exception); }
/** * @deprecated look at usage sites and replace with the proper replacements * according to https://goo.gl/Ivn2kc */ @Deprecated public static void throwUnchecked(final Throwable exception) { Exceptions.throwIfUnchecked(exception); throw new RuntimeException(exception); }
private <T> T makeProxy( MBeanServerConnection mbs, Class<T> beanInterface, ObjectName name ) { try { return beanInterface.cast( newMXBeanProxy.invoke( null, mbs, name, beanInterface ) ); } catch ( InvocationTargetException exception ) { Exceptions.throwIfUnchecked( exception.getTargetException() ); throw new RuntimeException( exception.getTargetException() ); } catch ( Exception exception ) { throw new UnsupportedOperationException( "Creating Management Bean proxies requires Java 1.6", exception ); } } }
/** * Halts this flusher, making it stop flushing. The current call to {@link PageCache#flushAndForce()} * will complete before exiting this method call. If there was an error in the thread doing the flushes * that exception will be thrown from this method as a {@link RuntimeException}. */ void halt() { halted = true; halt.await(); if ( error != null ) { throwIfUnchecked( error ); throw new RuntimeException( error ); } } }
private void closeAndThrow( Exception e ) { if ( pagedFile != null ) { try { closeStoreFile(); } catch ( IOException failureToClose ) { // Not really a suppressed exception, but we still want to throw the real exception, e, // but perhaps also throw this in there or convenience. e.addSuppressed( failureToClose ); } } throwIfUnchecked( e ); throw new RuntimeException( e ); }
private RuntimeException exitConstructor( Throwable throwable ) { try { close(); } catch ( IOException e ) { throwable = Exceptions.chain( new UncheckedIOException( e ), throwable ); } appendTreeInformation( throwable ); Exceptions.throwIfUnchecked( throwable ); return new RuntimeException( throwable ); }
@Override public void run() { try (Revert ignored = RenamesCurrentThread.renameThread(threadName())) { acceptInTransaction(this); } catch (Exception e) { Exceptions.throwIfUnchecked(e); throw new RuntimeException(e); } } }
@Override public void run() { try (Revert ignored = RenamesCurrentThread.renameThread(threadName())) { acceptInTransaction(this); } catch (Exception e) { Exceptions.throwIfUnchecked(e); throw new RuntimeException(e); } } }
@Override public IndexSample sampleIndex() throws IndexNotFoundKernelException { List<IndexSample> samples = new ArrayList<>(); Exception exception = null; for ( IndexSampler sampler : samplers ) { try { samples.add( sampler.sampleIndex() ); } catch ( IndexNotFoundKernelException | RuntimeException e ) { exception = Exceptions.chain( exception, e ); } } if ( exception != null ) { Exceptions.throwIfUnchecked( exception ); throw (IndexNotFoundKernelException)exception; } return combineSamples( samples ); }
if ( finalError != null ) Exceptions.throwIfUnchecked( finalError ); throw new RuntimeException( finalError );