docs: public static void crashLocalVoltDB(String errMsg, boolean stackTrace, Throwable thrown, boolean logFatal) {
  
          if (exitAfterMessage) {
              System.err.println(errMsg);
              VoltDB.exit(-1);
          }
          try {
              OnDemandBinaryLogger.flush();
          } catch (Throwable e) {}
  
          /*
           * InvocationTargetException suppresses information about the cause, so unwrap until
           * we get to the root cause
           */
          while (thrown instanceof InvocationTargetException) {
              thrown = ((InvocationTargetException)thrown).getCause();
          }
  
          // for test code
          wasCrashCalled = true;
          crashMessage = errMsg;
          if (ignoreCrash) {
              throw new AssertionError("Faux crash of VoltDB successful.");
          }
          if (CoreUtils.isJunitTest()) {
              VoltLogger log = new VoltLogger("HOST");
              log.warn("Declining to drop a crash file during a junit test.");
          }
          // end test code
          // send a snmp trap crash notification
          sendCrashSNMPTrap(errMsg);
          // try/finally block does its best to ensure death, no matter what context this
          // is called in
          try {
              // slightly less important than death, this try/finally block protects code that
              // prints a message to stdout
              try {
                  // turn off client interface as fast as possible
                  // we don't expect this to ever fail, but if it does, skip to dying immediately
                  if (!turnOffClientInterface()) {
                      return; // this will jump to the finally block and die faster
                  }
  
                  // Flush trace files
                  try {
                      VoltTrace.closeAllAndShutdown(new File(instance().getVoltDBRootPath(), "trace_logs").getAbsolutePath(),
                                                    TimeUnit.SECONDS.toMillis(10));
                  } catch (IOException e) {}
  
                  // Even if the logger is null, don't stop.  We want to log the stack trace and
                  // any other pertinent information to a .dmp file for crash diagnosis
                  List<String> currentStacktrace = new ArrayList<>();
                  currentStacktrace.add("Stack trace from crashLocalVoltDB() method:");
  
                  // Create a special dump file to hold the stack trace
                  try
                  {
                      TimestampType ts = new TimestampType(new java.util.Date());
                      CatalogContext catalogContext = VoltDB.instance().getCatalogContext();
                      String root = catalogContext != null ? VoltDB.instance().getVoltDBRootPath() + File.separator : "";
                      PrintWriter writer = new PrintWriter(root + "voltdb_crash" + ts.toString().replace(' ', '-') + ".txt");
                      writer.println("Time: " + ts);
                      writer.println("Message: " + errMsg);
  
                      writer.println();
                      writer.println("Platform Properties:");
                      PlatformProperties pp = PlatformProperties.getPlatformProperties();
                      String[] lines = pp.toLogLines(instance().getVersionString()).split("\n");
                      for (String line : lines) {
                          writer.println(line.trim());
                      }
  
                      if (thrown != null) {
                          writer.println();
                          writer.println("****** Exception Thread ****** ");
                          thrown.printStackTrace(writer);
                      }
  
                      printStackTraces(writer, currentStacktrace);
                      writer.close();
                  }
                  catch (Throwable err)
                  {
                      // shouldn't fail, but..
                      err.printStackTrace();
                  }
  
                  VoltLogger log = null;
                  try
                  {
                      log = new VoltLogger("HOST");
                  }
                  catch (RuntimeException rt_ex)
                  { /* ignore */ }
  
                  if (log != null)
                  {
                      if (logFatal) {
                          log.fatal(errMsg);
                      }
                      if (thrown != null) {
                          if (stackTrace) {
                              log.fatal("Fatal exception", thrown);
                          } else {
                              log.fatal(thrown.toString());
                          }
                      } else {
                          if (stackTrace) {
                              for (String currentStackElem : currentStacktrace) {
                                  log.fatal(currentStackElem);
                              }
                          }
                      }
                  } else {
                      System.err.println(errMsg);
                      if (thrown != null) {
                          if (stackTrace) {
                              thrown.printStackTrace();
                          } else {
                              System.err.println(thrown.toString());
                          }
                      } else {
                          if (stackTrace) {
                              for (String currentStackElem : currentStacktrace) {
                                  System.err.println(currentStackElem);
                              }
                          }
                      }
                  }
              }
              finally {
                  System.err.println("VoltDB has encountered an unrecoverable error and is exiting.");
                  System.err.println("The log may contain additional information.");
              }
          }
          finally {
              ShutdownHooks.useOnlyCrashHooks();
              System.exit(-1);
          }
      }