Hey guys,
I am writing an application where I want to follow the best practices on error handling.
This is what I have:
I created an enum for various issues that could happen within the DAL... INSERTFAILED, INSERTSUCCESSFUL etc... I am setting this enum to a property of the dal for the object to access after the dal is done with whatever method I call... get, getAll, update, insert, delete, etc...
The object can then access the property of the dal to get the exception message that was last thrown along with the enum value I set after I try catch finally in each method...
However, is this the best way to handle errors in n-tier design? What would be the best way to handle the SQL/XML/whatever error I may get in the dal and pass it up to the business object and then to the presentation layer?
Thanks guys!
Josh Fink