docs: public static Throwable sanitize(Throwable t) {
          // Note that this getBoolean access may well be synced...
          if (!SystemUtil.getBooleanSafe("groovy.full.stacktrace")) {
              StackTraceElement[] trace = t.getStackTrace();
              List<StackTraceElement> newTrace = new ArrayList<StackTraceElement>();
              for (StackTraceElement stackTraceElement : trace) {
                  if (isApplicationClass(stackTraceElement.getClassName())) {
                      newTrace.add(stackTraceElement);
                  }
              }
  
              // We don't want to lose anything, so log it
              STACK_LOG.log(Level.WARNING, "Sanitizing stacktrace:", t);
  
              StackTraceElement[] clean = new StackTraceElement[newTrace.size()];
              newTrace.toArray(clean);
              t.setStackTrace(clean);
          }
          return t;
      }