[ 
https://issues.apache.org/jira/browse/QPID-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rob Godfrey updated QPID-1434:
------------------------------

    Assignee: Martin Ritchie  (was: Rob Godfrey)
      Status: Open  (was: Ready To Review)

I think rethrow() is a really bad name for this as it is precisely what we are 
*not* doing
Instead we are creating a clone of the exception but filling it with a stack 
trace from the current thread
The use case for this functionality is where an exception is being passed from 
one thread to another

I think a slight change to the naming/semantics along the following lines would 
be better and clearer both for users of the method, and reviewers of code:

Instead of doing

e.rethrow()

Do

newE = e.cloneForCurrentThread();
throw e;



> Add ability to rethrow an AMQException
> --------------------------------------
>
>                 Key: QPID-1434
>                 URL: https://issues.apache.org/jira/browse/QPID-1434
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Common
>    Affects Versions: M3
>            Reporter: Martin Ritchie
>            Assignee: Martin Ritchie
>             Fix For: M4
>
>
> Summary:
> When we receive an exception we often simply rethrow by performing:
> throw receivedException;
> However this makes debugging difficult as the stack trace reflects the 
> original point where this exception occurred.
> Adding the ability to perform:
> receivedException.rethrow();
> As has been done to the TransportException in the 0-10 IO Transport layer 
> will allow us to improve our error reporting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to