You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Daniel Marbach (JIRA)" <ji...@apache.org> on 2013/04/26 14:24:17 UTC

[jira] [Created] (AMQNET-433) Correctly rethrow exceptions without swallowing the stack trace

Daniel Marbach created AMQNET-433:
-------------------------------------

             Summary: Correctly rethrow exceptions without swallowing the stack trace
                 Key: AMQNET-433
                 URL: https://issues.apache.org/jira/browse/AMQNET-433
             Project: ActiveMQ .Net
          Issue Type: Bug
          Components: ActiveMQ
            Reporter: Daniel Marbach
            Assignee: Jim Gomes
            Priority: Trivial


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;
}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira