Skip to content

Commit

Permalink
Log config errors
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Engel committed Jun 1, 2020
1 parent 3d226d4 commit 90dce8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ static SqlAuthenticationProviderManager()
{
configurationSection = (SqlAuthenticationProviderConfigurationSection)ConfigurationManager.GetSection(SqlAuthenticationProviderConfigurationSection.Name);
}
catch (ConfigurationErrorsException e)
{
// Don't throw an error for invalid config files
SqlClientEventSource.Log.TraceEvent("ConfigurationManager failed to load due to configuration errors: {0}", e);
}

Instance = new SqlAuthenticationProviderManager(configurationSection);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ static SqlAuthenticationProviderManager()
{
configurationSection = (SqlAuthenticationProviderConfigurationSection)ConfigurationManager.GetSection(SqlAuthenticationProviderConfigurationSection.Name);
}
catch (ConfigurationErrorsException)
catch (ConfigurationErrorsException e)
{
// Don't throw an error for invalid config files
SqlClientEventSource.Log.TraceEvent("ConfigurationManager failed to load due to configuration errors: {0}", e);
}
Instance = new SqlAuthenticationProviderManager(configurationSection);
Instance.SetProvider(SqlAuthenticationMethod.ActiveDirectoryIntegrated, activeDirectoryAuthProvider);
Expand Down

0 comments on commit 90dce8f

Please sign in to comment.