Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HandleException Bug?
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
HandleException Bug?
Miscellaneous
Thread ID:
00816629
Message ID:
00816629
Views:
56
I think there may be an issue with the mmBusinessObject "HandleException()" method. I've been noticiing that when I call SaveDataSet() on a business object that encounters a database exception, the existing transaction is not being rolled back. This seems to leave locks on the table.

After looking at the code, it appeared that the intent was to automatically rollback the transaction, but the exception is instead re-thrown (see below). The caller (mmBusinessObject.SaveDataSet()) is supposed to rollback the transaction if an exception is encountered. Isn't this a bug?


// See the "throw e" statement...
public virtual void HandleException(Exception e)
{
if (e is DBConcurrencyException)
{
// Build a concurrency exception message
DBConcurrencyException dbEx = (DBConcurrencyException)e;
this.ConcurrencyExceptionMsg =
this.BuildConcurrencyExceptionMsg(dbEx);
}
else
{
this.ConcurrencyExceptionMsg = null;
throw e; // ??? BUG HERE ???
}
// Store the exception at the business object level
this.Exception = e;

// Set to null since this IS the exception business object
this.ExceptionObject = null;
}
Brian Burlingame
Software Engineer/Consultant
Olympic Consulting Group
brian.burlingame@ocgworld.com
Next
Reply
Map
View

Click here to load this message in the networking platform