static internal ConfigurationErrorsException GetErrorsException(List<ConfigurationException> errors) { if (errors == null) { return null; } Debug.Assert(errors.Count != 0, "errors.Count != 0"); return new ConfigurationErrorsException(errors); }