code: public static InvalidStateException invalidState(String msg, Object... args) {
          throw new InvalidStateException(S.fmt(msg, args));
      }
docs: Throws out an {@link InvalidStateException} with message specified.