/** * Send @param t and any exception wrapped by @param r to the default uncaught exception handler, * or log them if none such is set up */ public static void logExceptionsAfterExecute(Runnable r, Throwable t) { Throwable hiddenThrowable = extractThrowable(r); if (hiddenThrowable != null) handleOrLog(hiddenThrowable); // ThreadPoolExecutor will re-throw exceptions thrown by its Task (which will be seen by // the default uncaught exception handler) so we only need to do anything if that handler // isn't set up yet. if (t != null && Thread.getDefaultUncaughtExceptionHandler() == null) handleOrLog(t); }
/** * Send @param t and any exception wrapped by @param r to the default uncaught exception handler, * or log them if none such is set up */ public static void logExceptionsAfterExecute(Runnable r, Throwable t) { Throwable hiddenThrowable = extractThrowable(r); if (hiddenThrowable != null) handleOrLog(hiddenThrowable); // ThreadPoolExecutor will re-throw exceptions thrown by its Task (which will be seen by // the default uncaught exception handler) so we only need to do anything if that handler // isn't set up yet. if (t != null && Thread.getDefaultUncaughtExceptionHandler() == null) handleOrLog(t); }
/** * Send @param t and any exception wrapped by @param r to the default uncaught exception handler, * or log them if none such is set up */ public static void logExceptionsAfterExecute(Runnable r, Throwable t) { Throwable hiddenThrowable = extractThrowable(r); if (hiddenThrowable != null) handleOrLog(hiddenThrowable); // ThreadPoolExecutor will re-throw exceptions thrown by its Task (which will be seen by // the default uncaught exception handler) so we only need to do anything if that handler // isn't set up yet. if (t != null && Thread.getDefaultUncaughtExceptionHandler() == null) handleOrLog(t); }
/** * Send @param t and any exception wrapped by @param r to the default uncaught exception handler, * or log them if none such is set up */ public static void logExceptionsAfterExecute(Runnable r, Throwable t) { Throwable hiddenThrowable = extractThrowable(r); if (hiddenThrowable != null) handleOrLog(hiddenThrowable); // ThreadPoolExecutor will re-throw exceptions thrown by its Task (which will be seen by // the default uncaught exception handler) so we only need to do anything if that handler // isn't set up yet. if (t != null && Thread.getDefaultUncaughtExceptionHandler() == null) handleOrLog(t); }
@Override public void afterExecute(Runnable r, Throwable t) { DebuggableThreadPoolExecutor.maybeResetTraceSessionWrapper(r); if (t == null) t = DebuggableThreadPoolExecutor.extractThrowable(r); if (t != null) { if (t instanceof CompactionInterruptedException) { logger.info(t.getMessage()); if (t.getSuppressed() != null && t.getSuppressed().length > 0) logger.warn("Interruption of compaction encountered exceptions:", t); else logger.debug("Full interruption stack trace:", t); } else { DebuggableThreadPoolExecutor.handleOrLog(t); } } } }
@Override public void afterExecute(Runnable r, Throwable t) { DebuggableThreadPoolExecutor.maybeResetTraceSessionWrapper(r); if (t == null) t = DebuggableThreadPoolExecutor.extractThrowable(r); if (t != null) { if (t instanceof CompactionInterruptedException) { logger.info(t.getMessage()); if (t.getSuppressed() != null && t.getSuppressed().length > 0) logger.warn("Interruption of compaction encountered exceptions:", t); else logger.trace("Full interruption stack trace:", t); } else { DebuggableThreadPoolExecutor.handleOrLog(t); } } // Snapshots cannot be deleted on Windows while segments of the root element are mapped in NTFS. Compactions // unmap those segments which could free up a snapshot for successful deletion. SnapshotDeletingTask.rescheduleFailedTasks(); }
@Override public void afterExecute(Runnable r, Throwable t) { DebuggableThreadPoolExecutor.maybeResetTraceSessionWrapper(r); if (t == null) t = DebuggableThreadPoolExecutor.extractThrowable(r); if (t != null) { if (t instanceof CompactionInterruptedException) { logger.info(t.getMessage()); if (t.getSuppressed() != null && t.getSuppressed().length > 0) logger.warn("Interruption of compaction encountered exceptions:", t); else logger.trace("Full interruption stack trace:", t); } else { DebuggableThreadPoolExecutor.handleOrLog(t); } } // Snapshots cannot be deleted on Windows while segments of the root element are mapped in NTFS. Compactions // unmap those segments which could free up a snapshot for successful deletion. SnapshotDeletingTask.rescheduleFailedTasks(); }
@Override public void afterExecute(Runnable r, Throwable t) { DebuggableThreadPoolExecutor.maybeResetTraceSessionWrapper(r); if (t == null) t = DebuggableThreadPoolExecutor.extractThrowable(r); if (t != null) { if (t instanceof CompactionInterruptedException) { logger.info(t.getMessage()); if (t.getSuppressed() != null && t.getSuppressed().length > 0) logger.warn("Interruption of compaction encountered exceptions:", t); else logger.trace("Full interruption stack trace:", t); } else { DebuggableThreadPoolExecutor.handleOrLog(t); } } // Snapshots cannot be deleted on Windows while segments of the root element are mapped in NTFS. Compactions // unmap those segments which could free up a snapshot for successful deletion. SnapshotDeletingTask.rescheduleFailedTasks(); }