{
synchronized (_currentExceptionLock)
{
if (_currentException != null)
{
SessionException se = _currentException;
_currentException = null;
ExecutionException ee = se.getException();
int code;
if (ee == null)
{
code = 0;
}
else
{
code = ee.getErrorCode().getValue();
}
throw new AMQException
(AMQConstant.getConstant(code), se.getMessage(), se);
}
}
}