/** * Abort the daemon * * @param error the error causing the abortion */ public static void abortSystem(final Throwable error) { DaemonStarter.currentPhase.set(LifecyclePhase.ABORTING); try { DaemonStarter.getLifecycleListener().aborting(); } catch (Exception e) { DaemonStarter.rlog.error("Custom abort failed", e); } if (error != null) { DaemonStarter.rlog.error("Unrecoverable error encountered --> Exiting : {}", error.getMessage()); DaemonStarter.getLifecycleListener().exception(LifecyclePhase.ABORTING, error); } else { DaemonStarter.rlog.error("Unrecoverable error encountered --> Exiting"); } // Exit system with failure return code System.exit(1); }
/** * Abort the daemon * * @param error the error causing the abortion */ public static void abortSystem(final Throwable error) { DaemonStarter.currentPhase.set(LifecyclePhase.ABORTING); try { DaemonStarter.getLifecycleListener().aborting(); } catch (Exception e) { DaemonStarter.rlog.error("Custom abort failed", e); } if (error != null) { DaemonStarter.rlog.error("Unrecoverable error encountered --> Exiting : " + error.getMessage()); DaemonStarter.getLifecycleListener().exception(LifecyclePhase.ABORTING, error); } else { DaemonStarter.rlog.error("Unrecoverable error encountered --> Exiting"); } // Exit system with failure return code System.exit(1); } }