471,316 Members | 1,114 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,316 software developers and data experts.

Error handling in a 3 Tier architecture????

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
Nov 19 '05 #1
3 2443
There is a exception managment guide from Microsoft:
http://msdn.microsoft.com/library/de...ceptdotnet.asp

You may want to check out the Enterprise Library's Exception Handling
Block yet? It allows you to define and change your exception handling
strategies in the config file, hence giving your flexibility in
adapting to your real usage (ie, should you log an exception? where?
when?..etc).

HTH,
Alex

Nov 19 '05 #2
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

"Alex" <li*****@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
There is a exception managment guide from Microsoft:
http://msdn.microsoft.com/library/de...ceptdotnet.asp

You may want to check out the Enterprise Library's Exception Handling
Block yet? It allows you to define and change your exception handling
strategies in the config file, hence giving your flexibility in
adapting to your real usage (ie, should you log an exception? where?
when?..etc).

HTH,
Alex

Nov 19 '05 #3
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

Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

25 posts views Thread by David Noble | last post: by
4 posts views Thread by Patrick | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.