Exception Handling with Fluent nHibernate

Jun 22, 2011 at 11:56 AM
Edited Jun 22, 2011 at 11:56 AM


How to catch Exceptions of Fluent nHibernate in Code ?


Ex Scenario :

Retrieving a record which do not exist in DB

Fluent nHibernate doesn't Crash the Application but it initializes all Properties of the Entity to 

'object.Property' threw an exception of type 'NHibernate.ObjectNotFoundException'

Which can not be handled by try catch Blocks, even i tried with NHibernate Exceptions ,Exceptions are not cought

How can we identify a particular type of Exceptions in Fluent nHibernate?