public static void setFailure(Error failure) {
    if (failure == null) {
      throw new IllegalArgumentException(
          "You are not permitted to un-set a system failure.");
    }
    if (SystemFailureTestHook.errorIsExpected(failure)) {
      return;
    }
    SystemFailure.failure = failure;
    notifyWatchDog();
  }
Set the underlying system failure, if not already set.
<p>
This method does not generate an error, and should only be used in circumstances where
execution needs to continue, such as when re-implementing
{@link ThreadGroup#uncaughtException(Thread, Throwable)}.

@param failure the system failure
@throws IllegalArgumentException if you attempt to set the failure to null
geode-core/src/main/java/org/apache/geode/SystemFailure.java