code: public static Throwable getConfigException()
    {
      ClassLoader loader = Thread.currentThread().getContextClassLoader();
  
      for (; loader != null; loader = loader.getParent()) {
        if (loader instanceof EnvironmentClassLoader) {
          EnvironmentClassLoader envLoader = (EnvironmentClassLoader) loader;
  
          if (envLoader.getConfigException() != null)
            return envLoader.getConfigException();
        }
      }
  
      return null;
    }
docs: Returns any configuration exception.