Skip to content

Instantly share code, notes, and snippets.

@clebertsuconic
Created August 11, 2014 17:26
Show Gist options
  • Save clebertsuconic/88f22468bd4e6104629f to your computer and use it in GitHub Desktop.
Save clebertsuconic/88f22468bd4e6104629f to your computer and use it in GitHub Desktop.
if (response.getType() == PacketImpl.EXCEPTION)
{
final HornetQExceptionMessage mem = (HornetQExceptionMessage) response;
HornetQException e = mem.getException();
Throwable cause = e.getCause();
e.fillInStackTrace();
// @Justin: I'm not sure if e.fillInStackTrace() would re-initialize the cause.. keep an eye on this
if (cause != null)
{
e.initCause(cause);
}
throw e;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment