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

  • Home
  • SEARCH
  • 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 146131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:32:49+00:00 2026-05-11T08:32:49+00:00

So, we are using the Enterprise Library 4.1 Exception Handling Application Block to deal

  • 0

So, we are using the Enterprise Library 4.1 Exception Handling Application Block to deal with logging/handling our exceptions in a multiple-project application. We have a few custom exceptions and are throwing some exceptions whose classes are defined in the .NET framework’s standard class libraries (e.g. ArgumentException, InvalidOperationException, ArgumentNullException, etc.).

Today, our team lead decided that he didn’t want us to use the latter, since the .NET framework would throw those types of exceptions, and in order to facilitate filtering with the application block’s policies, we should use only custom exceptions, going so far as to practically duplicate .NET standard class library exceptions with custom versions, as in CustomArgumentException, CustomInvalidOperationException, etc.

My question is, what is wrong with this approach? I couldn’t put my finger on it at the time, but it smelled wrong to me and I haven’t been able to shake my uneasy feelings about it. Am I worried about something that really isn’t that big of a deal? I guess it just feels like the tail wagging the dog a bit here…

  • 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. 2026-05-11T08:32:50+00:00Added an answer on May 11, 2026 at 8:32 am

    Ick. What I don’t like about it is:

    • It duplicates existing types
    • It violates the principle of least surprise
    • It means that if you want to find everywhere you’ve used the wrong argument value (say) you have to look for two type hierarchies of exception instead of just looking for ArgumentException.

    I would suggest you get your team lead to read item 60 of Effective Java 2nd edition. Yes, it’s about Java rather than C# – but the principles remain the same.

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

Sidebar

Related Questions

I'm using the Enterprise Library Exception handling block in an ASP.NET web application. I
I am using Enterprise Library 4.x for my exception handling logging (ASP.NET application). Here
Using .NET 3.5, ASP.NET, Enterprise Library 4.1 Exception Handling and Logging blocks, I wrote
I am using Enterprise application block on my application' server side to handle exceptions.
I m using Microsoft Enterprise Library 3.1 for Exception Handling in asp.net, the erors
I'm using the Logging Application Block (LAB) in my ASP.NET application along with the
Can anyone provide (or point me to) example sql code for logging exceptions using
In the most recent version (4.1, released October 2008) of The Microsoft Enterprise Library's
Are you using any framework (like Prism or Unity )? What are your experiences

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.