I am not new to LLBLGen, but I am new to v2.6. I am using LLBLGen Final (Oct. 9th 2009) with the .NET 2.0 SQL Server self servicing templates.
I find that I am unable to catch the ORMException locally in a simple console application. This was never a problem in my .NET 1.1 project, so I'm stumped. Please note that I am deliberately trying to create an exception to test my exception handling logic. Here's the code:
Eu66Entity eu66 = new Eu66Entity();
<initialize entity fields>
eu66.FailCd = 0; // this value must be > 0 as defined by DB constraint
try
{
eu66.Save();
}
catch (ORMException ormEx)
{
<exception handling code>
}
The exception does not bubble up to this try/catch as I expected. Instead I get an unhandled exception error in the InsertEntity() method of the entity class. What am I missing?