Uploaded image for project: 'ActiveMQ .Net'
  1. ActiveMQ .Net
  2. AMQNET-433

Correctly rethrow exceptions without swallowing the stack trace

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 1.6.0
    • ActiveMQ
    • None

    Description

      When looking through the code I saw a lot of the following code snippets:

      try
      {

      }
      catch(AnyException ex)

      { // do something throw ex; } This WILL rewrite the stack trace and is not considered best practice. I suggest you change the appropriate places in the code to: try { }

      catch(AnyException ex)
      {
      // do something
      throw;
      }

      Attachments

        Activity

          People

            jgomes Jim Gomes
            danielmarbach Daniel Marbach
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: