From: NHibernate J. <mik...@us...> - 2006-10-31 07:09:33
|
NHibernate should throw exception on failed driver load ------------------------------------------------------- Key: NH-784 URL: http://jira.nhibernate.org/browse/NH-784 Project: NHibernate Type: Improvement Components: Data Providers Reporter: Al Twohill Priority: Trivial For full background on where this issue arises from, see http://forum.hibernate.org/viewtopic.php?t=966582&highlight= When Configuration.Configure() is called, if NHibernate is unable to load a database driver for whatever reason (missing dll, incorrect hibernate.cfg.xml, etc) it falls back to returning a UserSuppliedConnectionProvider without an ADO.Net connection attached to it. This causes any use of Session (eg accessing database) to throw an exception. This is extremely difficult to debug, as there is absolutely no indication as to why a UserSuppliedConnectionProvider is returned. I propose that instead of returning a UserSuppliedConnectionProvider, NHibernate should throw an exception along the lines of "Cannot Load Driver", and give a reason why. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |