<commit_before>using System;
using System.Data;

namespace NHibernate.Driver
{
	public abstract class ReflectionBasedDriver : DriverBase
	{
		private System.Type connectionType;
		private System.Type commandType;

		/// <summary>
		/// Initializes a new instance of <see cref="ReflectionBasedDriver" /> with
		/// type names that are loaded from the specified assembly.
		/// </summary>
		/// <param name="driverAssemblyName">Assembly to load the types from.</param>
		/// <param name="connectionTypeName">Connection type name.</param>
		/// <param name="commandTypeName">Command type name.</param>
		public ReflectionBasedDriver( string driverAssemblyName, string connectionTypeName, string commandTypeName )
		{
			// Try to get the types from an already loaded assembly
			connectionType = Util.ReflectHelper.TypeFromAssembly( connectionTypeName, driverAssemblyName );
			commandType    = Util.ReflectHelper.TypeFromAssembly( commandTypeName,    driverAssemblyName );

			if( connectionType == null || commandType == null )
			{
				throw new HibernateException(
					string.Format( "The IDbCommand and IDbConnection implementation in the assembly {0} could not be found.  "
					+ "Please ensure that the assembly {0} is in the Global Assembly Cache or in a location that NHibernate "
					+ "can use System.Type.GetType(string) to load the types from.", driverAssemblyName ) );
			}
		}

		public override IDbConnection CreateConnection()
		{
			return ( IDbConnection ) Activator.CreateInstance( connectionType );
		}

		public override IDbCommand CreateCommand()
		{
			return ( IDbCommand ) Activator.CreateInstance( commandType );
		}

	}
}<commit_msg>NH-632 - change error message if the database driver is not found.<commit_after>using System;
using System.Data;

namespace NHibernate.Driver
{
	public abstract class ReflectionBasedDriver : DriverBase
	{
		private System.Type connectionType;
		private System.Type commandType;

		/// <summary>
		/// Initializes a new instance of <see cref="ReflectionBasedDriver" /> with
		/// type names that are loaded from the specified assembly.
		/// </summary>
		/// <param name="driverAssemblyName">Assembly to load the types from.</param>
		/// <param name="connectionTypeName">Connection type name.</param>
		/// <param name="commandTypeName">Command type name.</param>
		public ReflectionBasedDriver( string driverAssemblyName, string connectionTypeName, string commandTypeName )
		{
			// Try to get the types from an already loaded assembly
			connectionType = Util.ReflectHelper.TypeFromAssembly( connectionTypeName, driverAssemblyName );
			commandType    = Util.ReflectHelper.TypeFromAssembly( commandTypeName,    driverAssemblyName );

			if( connectionType == null || commandType == null )
			{
				throw new HibernateException(
					string.Format(
						  "The IDbCommand and IDbConnection implementation in the assembly {0} could not be found. "
						+ "Ensure that the assembly {0} is located in the application directory or in the Global "
						+ "Assembly Cache. If the assembly is in the GAC, use <qualifyAssembly/> element in the "
						+ "application configuration file to specify the full name of the assembly.",
						driverAssemblyName));
			}
		}

		public override IDbConnection CreateConnection()
		{
			return ( IDbConnection ) Activator.CreateInstance( connectionType );
		}

		public override IDbCommand CreateCommand()
		{
			return ( IDbCommand ) Activator.CreateInstance( commandType );
		}

	}
}
{'fraction_non_alphanumeric': 0.08989086731763354, 'fraction_numerical': 0.002010338885697875, 'mean_word_length': 3.9615384615384617, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6193900', 'n_tokens_mistral': 1025, 'n_tokens_neox': 887, 'n_words': 308}