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 8874499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:44:16+00:00 2026-06-14T18:44:16+00:00

The layout of our application is as follows WCF – Business Layer class library

  • 0

The layout of our application is as follows

WCF – Business Layer class library dll – Data Access Layer class library dll – SQL Server.

Generally the class libraries do not access external resources other than the DB.

The WCF layer delivers data for reports.

Having seen some guidance that exceptions should be handled in the upper level I guess this means that I could simply let the class libraries throw the exceptions and so I do not need any try catch statements in the class libraries what so ever!

I feel the don’t need to catch exceptions and log specific info in the library and plan to catch exceptions in the app/client code which in this case is the WCF layer.
WCF Exception Handling Strategies

At this level I plan to log the exception/stacktrace and present a user friendly exception.

I feel that logging the stack trace at WCF level will give me enough info to determine the
cause of the issue and also.

Is this an OK approach or have I missed something

I wish to keep it simple, avoid unnecessary try catches and handle exceptions/log in one location only.

  • 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-06-14T18:44:17+00:00Added an answer on June 14, 2026 at 6:44 pm

    Eric Lippert has written a good article on Exception Handling. I suggest you might take a look.

    Unless you can absolutely do something, you might catch any exception so that you can try something else to avoid it. If there’s no way you may avoid it, then let’s hope for the best with the finally block. Otherwise, IMHO, it is best to let the exception bubble up and handle it there, since you “don’t know” what will really consume your service, so I think your service shall let any exception bubble up and let the end-user decide what to do with it, as everyone will not handle these the same.

    Again, from an Eric Lippert’s blog which I can’t find the URL right now, it is best to write code such as:

    if (someUncoverableCondition)
        throw new SomeSpecificException();
    

    than trying to catch every exception possible.

    In the end, handle what you can and what you know how to handle, and let the other exceptions occur. Perhaps after a while you’ll know how to handle those exception in an efficient way so that you can refactor your code. Meanwhile, if you feel like it’s perhaps better to let them through, that must be the right thing to do in your situation.

    Here’s further reading.

    The Bad Practices of Exception Handling (Perhaps not directly related, but good to know anyway)

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

Sidebar

Related Questions

We are trying to use Log4Net to log from our IIS 6-deployed WCF Application.
In our application there is a basic layout for all views. To reuse common
Assume the following problem context: 1) In our application, we have a business object
We have a requirement to use WCF as a data source in our reports.
My application start Registration id create every time and send to server. public class
our svn had so far traditional layout: trunk branches/ tags/ i cloned whole the
One of our views has a ScrollView as its root layout. When the device
Having ListView but I can customizing it only by modifying layout.xml (it's our system
Based on the user requirements, he wants to use our android application via pin
In our asp.net application,we use the form authenciation. And we use the iframe for

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.