code: @SuppressWarnings({"PMD.AvoidCatchingThrowable","PMD.AvoidInstanceofChecksInCatchClause"})
      public static Runnable swallowExceptions(Runnable in)
      {
          return () -> {
              try {
                  in.run();
              } catch (Error tt) {
                  LOGGER.error("Error (will be rethrown)", tt);
                  throw tt;
              } catch (Throwable t) {
                  LOGGER.error("Uncaught exception swallowed", t);
                  // Ignore the IDE warning - consider Lombok's SneakyThrows, which is an abomination but heavily used by heathens, whom I pray for.
                  if (t instanceof InterruptedException) {
                      Thread.currentThread().interrupt();
                  }
              }
          };
      }
docs: Transform a Runnable to log and then swallow any thrown exceptions. However, {@link Error}s are still re-thrown.
  @param in the runnable to wrap
  @return a runnable that will swallow exceptions