From 4286acdb2b7e1c4f9de480357c387c8d8c3bc033 Mon Sep 17 00:00:00 2001 From: Jonathan Hsieh Date: Wed, 13 Feb 2013 18:22:42 +0000 Subject: [PATCH] HBASE-7436 Improve stack trace info dumped by ForeignExceptionSnare#rethrowException git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/hbase-7290@1445800 13f79535-47bb-0310-9956-ffa450edef68 --- .../hbase/errorhandling/ForeignExceptionDispatcher.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/errorhandling/ForeignExceptionDispatcher.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/errorhandling/ForeignExceptionDispatcher.java index 441219b7c14..17aceb0ba60 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/errorhandling/ForeignExceptionDispatcher.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/errorhandling/ForeignExceptionDispatcher.java @@ -87,7 +87,9 @@ public class ForeignExceptionDispatcher implements ForeignExceptionListener, For @Override public void rethrowException() throws ForeignException { if (exception != null) { - throw exception; + // This gets the stack where this is caused, (instead of where it was deserialized). + // This which is much more useful for debugging + throw new ForeignException(exception.getSource(), exception.getCause()); } }