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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:55:13+00:00 2026-06-15T14:55:13+00:00

Possible Duplicate: .NET Global exception handler in console application I’ve read a lot of

  • 0

Possible Duplicate:
.NET Global exception handler in console application

I’ve read a lot of things about global exception handling on stackoverflow, but I could not find anything refering to my topic properly. I wrote a console application that catches exceptions just in the methods they occur. No throw’s at all. What I want to have is a global exception handling. I no the basic guidlines about exception handling, but got no idea beyond those basics. Imaginary there should be one class handling those exceptions (thrown by the methods from the different classes). I don’t need any error-recording or error-reporting mechanisms yet. Just need the basics (patterns whatever…) to implement this global handling. Thanks for reading so far!

  • 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-15T14:55:15+00:00Added an answer on June 15, 2026 at 2:55 pm

    Handling exceptions globally is good for certain tasks only, such as logging errors or graceful exit of the application.

    In all other cases, it is recommended that you handle the exception in the most relevant place. For example, if you make a web service call from your app and if the service is not available, you should handle that exception where you make the webservice call instead of catching it globally. This improves the readability of the code, and also it’s not practical to do anything sensible at global level as you have very little information on where the exception originated. (Of course you have the stack trace, but its not readily available for programmatic manipulation)

    However, you can add an application wide exception handler by attaching a handler to AppDomain.UnhandledException as also indicated in the comment by @Jesse

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

Sidebar

Related Questions

Possible Duplicate: .Net Console Application that Doesn’t Bring up a Console I have a
Possible Duplicate: .NET - Check if directory is accessible without exception handling Im making
Possible Duplicate: VB.NET RemoveHandler & Anonymous Methods If I add an event handler like
Possible Duplicate: Protect .NET code from reverse engineering? we just develop a application with
Possible Duplicate: Porting VB.NET Winforms Application to C# Is there any way to convert
Possible Duplicate: .NET windows application, can it be compressed into a single .exe? I
Possible Duplicate: .NET windows application, can it be compressed into a single .exe? To
Possible Duplicate: .NET Controls: Why aren’t all calls thread-safe? This question is not about
Possible Duplicate: C#/.NET analysis tool to find race conditions/deadlocks I am debugging an application
Possible Duplicate: How do I publish a Asp.net web application using MSBuild? I have

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.