code: private <T extends Throwable> T ignoreWarnOrFail(Throwable throwable, Class<T> exceptionClassToRaise, String msgKey, Object... objs) {
  
          // Read the value each time in order to allow for changes to the onError setting
          switch ((OnError) props.get(OnErrorUtil.CFG_KEY_ON_ERROR)) {
              case IGNORE:
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      Tr.debug(this, tc, "ignoring error: " + msgKey, objs);
                  return null;
              case WARN:
                  Tr.warning(tc, msgKey, objs);
                  return null;
              case FAIL:
                  try {
                      if (throwable != null && exceptionClassToRaise.isInstance(throwable))
                          return exceptionClassToRaise.cast(throwable);
  
                      Constructor<T> con = exceptionClassToRaise.getConstructor(String.class);
                      String message = msgKey == null ? throwable.getMessage() : Tr.formatMessage(tc, msgKey, objs);
                      T failure = con.newInstance(message);
                      failure.initCause(throwable);
                      return failure;
                  } catch (RuntimeException e) {
                      throw e;
                  } catch (Exception e) {
                      throw new RuntimeException(e);
                  }
          }
  
          return null;
      }
docs: Ignore, warn, or fail when a configuration error occurs.
  This is copied from Tim's code in tWAS and updated slightly to
  override with the Liberty ignore/warn/fail setting.
  Precondition: invoker must have lock on this MongoDBService instance, in order to read the onError property.
  
  @param throwable an already created Throwable object, which can be used if the desired action is fail.
  @param exceptionClassToRaise the class of the Throwable object to return
  @param msgKey the NLS message key
  @param objs list of objects to substitute in the NLS message
  @return either null or the Throwable object