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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:06:21+00:00 2026-05-14T23:06:21+00:00

I have a large C# code base. It seems quite buggy at times, and

  • 0

I have a large C# code base. It seems quite buggy at times, and I was wondering if there is a quick way to improve finding and diagnosing issues that are occuring on client PCs.

The most pressing issue is that exceptions occur in the software, are caught, and even reported through to me. The problem is that by the time they are caught the original cause of the exception is lost.

I.e. If an exception was caught in a specific method, but that method calls 20 other methods, and those methods each call 20 other methods. You get the picture, a null reference exception is impossible to figure out, especially if it occured on a client machine.

I have currently found some places where I think errors are more likely to occur and wrapped these directly in their own try catch blocks. Is that the only solution? I could be here a long time.

I don’t care that the exception will bring down the current process (it is just a thread anyway – not the main application), but I care that the exceptions come back and don’t help with troubleshooting.

Any ideas?

I am well aware that I am probably asking a question which sounds silly, and may not have a straightforward answer. All the same some discussion would be good.

  • 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-14T23:06:22+00:00Added an answer on May 14, 2026 at 11:06 pm

    Exceptions maintain the call stack which you can use to trace the source of the exception unless the exception is rethrown improperly or is swallowed. By the former, I mean something like:

    try
    {
        //...
    }
    catch ( Exception e )
    {
        //do stuff with exception
        throw e;
    }
    

    Instead of :

    try
    {
        //...
    }
    catch ( Exception )
    {
        //do stuff with exception
        throw;
    }
    

    The later maintains the call stack whereas the former does not. In general, code should only catch exceptions that it plans on handling rather than all exceptions. If the code is properly designed this way, then when the top most layer catches the exception, you should have via the call stack the method that started the chain of events.

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

Sidebar

Related Questions

I have a large code base of quite old C code on an embedded
We have a large code base in MFC and VB. A few applications are
I have a really large VB6 code base with a ton of 3rd party
We have a large ASP classic code base but I'm looking to do future
I have a large code base under source control (was subversion, now git). To
We have a fairly large code-base. The vast majority of the code is compiled
I have a large library of code which has a few (much too few)
I have a large document with code samples in. I want to know the
I have a function definition of the following form (within a large code): class
I have a large piece of Python 2 only code. It want to check

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.