Error Handling and UI Presentation

J

Jeff S

I'm looking for suggestions on how to handle the situation in which some
error occurs and I need to tell the user something about it. I'm currently
developing error handling in the DAL and currently handle most of the likely
runtime error scenarios there. What I need to ensure is that the user sees
something informative for scenarios in which, for example, a connection to
the database could not be established in the DAL, so the product catalog
would appear to be empty.

Does the built-in customizable error page feature of ASP.NET kick in even
when I handle an error (i.e, in a Try... Catch... Finally block)?

What are some alternatives to the built-in customizable error page feature
for accomplishing what I want... I don't think I could do a
Response.Redirect from the DAL - so what can I do to let the user know when
something went wrong in the DAL? (note: the DAL is in the same assembly as
the presentation layer in this scenario).

Thanks!
 
A

Alvin Bruney [MVP]

the DAL layer should be concerned with DALing not UI interface issues. If
there is no connection, throw an exception. Empower your calling layer to
make the informed decision. This is not the job of the DAL tier. Cleanly
separating your tier is what it's all about. Loose coupling makes for easier
debugging and easier maintenance and readability.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top