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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:14:12+00:00 2026-05-16T16:14:12+00:00

Hey there, I keep hearing over and over again that I should ALWAYS use

  • 0

Hey there, I keep hearing over and over again that I should ALWAYS use custom exceptions in my web apps.. The problem is that I dont see any reason for making custom exceptions when they all are handled in the global.asax(write to database etc.) anyway.. So why should I use them?

  • 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-16T16:14:13+00:00Added an answer on May 16, 2026 at 4:14 pm

    I almost never use custom exceptions. When I do manually throw an exception I provide a detailed message.

    I’ve found the maintenance of the exceptions is not worth the hassle.

    Update

    Lets put this into context. The Question is if someone should create custom exceptions in a web application. I envision this as a basic crud app.

    Web Applications

    In Web Applications you almost NEVER need custom exceptions. Data is being written to the database and data is being read from the database. The data is then consumed by some sort of UI: MVC, WPF, WebForms… etc. In such an app, there is not a opportunity for custom exceptions. Every application is different, so there will be exceptions to this…

    Frameworks

    Frameworks are an entirely different animal. As a framework developer it’s your job to provide visibility into why an error has occurred. I expect verbose exceptions from a framework, maybe custom, maybe not. I expect enough information to solve the error.

    As @Wyatt Barnett pointed out a new exception should offer something more, something that can not be done with an existing class.

    Reason I Would Create a Custom Exception

    1. To convey more detailed and specific information
      about the error.
    2. To provide a means to catch this error conditions (i.e. ‘FileNotFoundExeception’, this allows a business decision to be made at a higher layer.)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hey there i have this code that should save a file from sql server
hey there guys and girls i have this code that should download a json
hey there, i have a div that expands when the page is loaded, now
Hey there. I'm trying to write a small program that will read the four
Hey there, trying to install a ruby gem but I keep getting the following
Hey there, I have a small problem with compiling and linking with the command
Hey so i'm making a function that gathers up sprites that you wanna keep
Hey there. I would really appreciate your help in creating a query that would
Hey there, I have read the few posts here on when/how to use the
Hey there, So I've been heavily focused on design/development using web technology for the

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.