Not understandable exception message
Description
Environment
None
Activity
Show:
Fixed
Details
Details
Assignee
Unassigned
UnassignedReporter
Antonio Budano
Antonio BudanoComponents
Fix versions
Affects versions
Priority
Who's Looking?
Open Who's Looking?
Created June 5, 2009 at 6:05 AM
Updated July 22, 2009 at 7:21 AM
Resolved June 5, 2009 at 11:11 AM
Who's Looking?
When you get an exception from NHibernate related to, let's say updating an entity that cause a Duplicate Key Violation on the DB, the exception message doesn't explain what happend. In this case you get a NHibernate.Exceptions.GenericADOException with the following message: {"could not insert: [Budano.Store.DomainModel.Article]
[SQL: NHibernate.SqlCommand.SqlCommandInfo]"}. This message is related to an application I am creating and the Article entity is causing a Duplicate Key Violation due to a unique index in the DB. The message must contain all details about the entity is causing the problem instead of [SQL: NHibernate.SqlCommand.SqlCommandInfo].
It has been discussed with Fabio Maulo on this group: http://groups.google.com/group/nh-it/browse_thread/thread/dae158f708d8335a?pli=1
Antonio