Accessing database errors

Accessing database errors

Old forum URL: forums.lhotka.net/forums/t/6045.aspx


gPlans posted on Tuesday, December 23, 2008

Hi all,
Using CSLA, how do I, from the UI or from a CSLA Business object, access an error raised by the database engine or those I raise myself inside sprocs using RAISERROR. I am in a situation where an error is occurring inside a sproc, but from the UI point of view, everything seems to be alright. But when I check the database table, an update has not actually occurred.
Regards,
Joe

Curelom replied on Tuesday, December 23, 2008

You should be getting an error.  Are you sure you aren't trapping it somewhere?

JoeFallon1 replied on Wednesday, December 24, 2008

Rocky is very clear in the books about *not* catching errors in the data portal code that you write. If a failure occurs you want the framework to catch it and pass it back to you. So you should check your code to see if you are catching any exceptions in the data portal.

Joe

 

gPlans replied on Monday, December 29, 2008

Got it. I must have been doing something wrong because now i am correctly getting the db errors. Thanks both.

Copyright (c) Marimer LLC