/// <summary>Forcibly terminates the currently running Java virtual machine.</summary> /// <param name="status">exit code</param> /// <param name="msg"> /// message used to create the /// <c>HaltException</c> /// </param> /// <exception cref="HaltException">if Runtime.getRuntime().halt() is disabled for test purposes /// </exception> /// <exception cref="Org.Apache.Hadoop.Util.ExitUtil.HaltException"/> public static void Halt(int status, string msg) { Log.Info("Halt with status " + status + " Message: " + msg); if (systemHaltDisabled) { ExitUtil.HaltException ee = new ExitUtil.HaltException(status, msg); Log.Fatal("Halt called", ee); if (null == firstHaltException) { firstHaltException = ee; } throw ee; } Runtime.GetRuntime().Halt(status); }
public static void ResetFirstHaltException() { firstHaltException = null; }