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

Correctly rethrow exceptions without swallowing the stack trace

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment