Error handling in a 3 Tier architecture????

A

Annie

hello guys,

I have a GUI, Business Object layer and data layer.

What is the best way to handle errors in these layers?

Do I need to catch errors in all these layers? Or simply as all the errors
will fall to the GUI layer ultimately I
just need to handle the errors in the GUI layer and that is it?

any example or online resource in a simple base will be appreciated.

Ta
 
A

Annie

Thanks Alex,

I have already seen Microsoft guidelines for error handling as the links
bellow however that is in very general form
I specifically want it in a tiered application and how to manage and handle
the errors.

I haven't checked Enterprise Library's Exception Handling
Block. Thanks for your help and response


TA
 
A

Alex

Annie,

The guide talks about handling errors in between layer boundaries too.
It may sounds general since exception handling is typically specific to
the application.
I would say if all your layers will be hosted on the same machine, then
handling all the recoverable exceptions when they arise, and let the UI
layer handles the rest of the nonrecoverable / unexpected exceptions is
a sound and simple way.
How should you handle them? That again depends on your application and
situation, but the Enterprise Library provides you the flexibility to
change your handling strategies (log, wrap, substitute, rethrow, a
combination..etc) for any types of exception. It may seems there are
many choices, but it is usually best to do the simplest thing that
could possibly work ;)

HTH,
Alex
 

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

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top