@Override protected void execute() { try { drainQueue(); } catch (Exception e) { e.printStackTrace(); } } });
private void logParsingError(Element element, Class<? extends Annotation> annotation, Exception e) { StringWriter stackTrace = new StringWriter(); e.printStackTrace(new PrintWriter(stackTrace)); error(element, "Unable to parse @%s binding.\n\n%s", annotation.getSimpleName(), stackTrace); }
@Override public Integer apply(Integer v) { try { Thread.sleep(10); } catch (Exception e) { e.printStackTrace(); } return v; } })
@Override public void accept(Integer t1) { try { Thread.sleep(100); } catch (Exception e) { exception.set(e); e.printStackTrace(); } finally { latch.countDown(); } }
@Override public void accept(Integer t1) { try { Thread.sleep(100); } catch (Exception e) { exception.set(e); e.printStackTrace(); } finally { latch.countDown(); } }
@Override public void run() { try { start.await(); } catch (Exception e1) { e1.printStackTrace(); } // System.out.println("> " + j); rs.onNext(1); } });
@Override public void run() { try { start.await(); } catch (Exception e1) { e1.printStackTrace(); } rs.onNext(1); } });
@Override public void run() { try { start.await(); } catch (Exception e1) { e1.printStackTrace(); } rs.onNext(1); } });
@Override public void run() { try { start.await(); } catch (Exception e1) { e1.printStackTrace(); } rs.onNext(1); } });
@Override public void run() { try { start.await(); } catch (Exception e1) { e1.printStackTrace(); } rs.onNext(1); } });
@Override public void run() { try { start.await(); } catch (Exception e1) { e1.printStackTrace(); } // System.out.println("> " + j); rs.onNext(1); } });
@Override public void run() { try { // a timeout exception will happen if we don't get a terminal state String v = subject.timeout(2000, TimeUnit.MILLISECONDS).blockingSingle(); value.set(v); } catch (Exception e) { e.printStackTrace(); } } }
@Override public void run() { try { // a timeout exception will happen if we don't get a terminal state String v = processor.timeout(2000, TimeUnit.MILLISECONDS).blockingSingle(); value.set(v); } catch (Exception e) { e.printStackTrace(); } } }
@Override public void run() { try { // a timeout exception will happen if we don't get a terminal state String v = processor.timeout(2000, TimeUnit.MILLISECONDS).blockingSingle(); value.set(v); } catch (Exception e) { e.printStackTrace(); } } }
@Override public void run() { try { // a timeout exception will happen if we don't get a terminal state String v = processor.timeout(2000, TimeUnit.MILLISECONDS).blockingSingle(); value.set(v); } catch (Exception e) { e.printStackTrace(); } } }
@Override public void run() { try { // a timeout exception will happen if we don't get a terminal state String v = subject.timeout(2000, TimeUnit.MILLISECONDS).blockingSingle(); value.set(v); } catch (Exception e) { e.printStackTrace(); } } }
@Override public void run() { try { // a timeout exception will happen if we don't get a terminal state String v = subject.timeout(2000, TimeUnit.MILLISECONDS).blockingSingle(); value.set(v); } catch (Exception e) { e.printStackTrace(); } } }
public void testCheckedThrowableSync(CacheableService<?> service) throws Exception { String arg = UUID.randomUUID().toString(); try { service.throwCheckedSync(arg); fail("Excepted exception"); } catch (Exception ex) { ex.printStackTrace(); assertEquals("Wrong exception type", IOException.class, ex.getClass()); assertEquals(arg, ex.getMessage()); } }
@Test public void onNextOnErrorFailure() { try { OBSERVER_ONNEXT_ONERROR_FAIL().onNext("one"); fail("expects exception to be thrown"); } catch (Exception e) { e.printStackTrace(); assertTrue(e instanceof SafeObserverTestException); assertEquals("onNextFail", e.getMessage()); } }
@Test public void onNextOnErrorFailure() { try { OBSERVER_ONNEXT_ONERROR_FAIL().onNext("one"); fail("expects exception to be thrown"); } catch (Exception e) { e.printStackTrace(); assertTrue(e instanceof SafeSubscriberTestException); assertEquals("onNextFail", e.getMessage()); } }