Commits

Inside Zhou committed 6045fc3

找不到provider时,使用更详细的异常提示。

  • Participants
  • Parent commits ac02f55

Comments (0)

Files changed (1)

File Sql/SQLHelper.cs

 				throw new ArgumentNullException();
 			}
 
-			this.Factory = DbProviderFactories.GetFactory(connSettings.ProviderName);
+			try {
+				this.Factory = DbProviderFactories.GetFactory(connSettings.ProviderName);
+			}
+			catch(ConfigurationErrorsException e) {
+				throw new ConfigurationErrorsException("{0} : {1}".Fmt(e.Message, connSettings.ProviderName));
+			}
 
 			this.Conn = this.Factory.CreateConnection();
 			this.Conn.ConnectionString = connSettings.ConnectionString;