Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6686935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:13:46+00:00 2026-05-26T05:13:46+00:00

I got a question about exception handling. I guess it may be quite easy

  • 0

I got a question about exception handling.
I guess it may be quite easy for you but for me I just don’t know how to handle exception in multi-tier projects.

Let’s say in my solution, I have several project.

I have (lower) DataAccess, BizComponent, WCF, Proxy and Presentation (upper).

I try to "try catch" in DataAccess and throw the exception to BizComponent and in BizComponent I try again "try catch" and log the error and throw the exception again to WCF.

In WCF and Proxy layers, I do the same thing. In presentation layer, I show come custom message to end user.

My senior told me that I only need to start doing "try catch" in WCF and upper layers.
And I don’t need to do in DataAccess and BizComponent because it will be caught in
WCF.

Should I try to catch the exception in DataAccess,BizComponent and
throw exception or should I just try to catch only in WCF and starts
throwing to upper layers?

Which one is better practice ?

If you are not clear about my question, please let me know.
This is my first multi-tier projects so it makes me confused.
Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:13:46+00:00Added an answer on May 26, 2026 at 5:13 am

    As a rule of thumb only handle (catch) exceptions if you are going to do something with them.

    For example, if you could catch a database exception in the data layer if you wanted to provide additional information in the “upper” layers.

    An approach I use personally is to catch and log exceptions in the business layer and then rethrow the same exception or a wrapping exception that provides more friendly information for layers higher in your stack. This provides a consistent logging process and does not require boiler plate logging code in the application.

    If you reuse the code in multiple applications and need different log stores this can be handled using dependancy injection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just got a question about generics, why doesn't this compile when using a generic
I've got a question about something that's just been irritating me. A colleague and
In fact I have Idea about the exception handling. But while facing the interview
In previous question I got comment about Oracle statistics: Oracle doesn't know that 50M
I have a question about handling exception. I have a Winform that uses a
I have a question about error/exception handling on the iPhone. I've read the documentation
I've got question about wpf xaml style definitions. When I try to set style
i got a question about unsigned char array. How can i store an integer
I've got a question about references between projects in a solution. Most of my
I've got a question about testing methods working on strings. Everytime, I write a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.