You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jm...@apache.org on 2013/02/13 19:22:42 UTC

svn commit: r1445800 - /hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/errorhandling/ForeignExceptionDispatcher.java

Author: jmhsieh
Date: Wed Feb 13 18:22:42 2013
New Revision: 1445800

URL: http://svn.apache.org/r1445800
Log:
HBASE-7436 Improve stack trace info dumped by ForeignExceptionSnare#rethrowException


Modified:
    hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/errorhandling/ForeignExceptionDispatcher.java

Modified: hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/errorhandling/ForeignExceptionDispatcher.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/errorhandling/ForeignExceptionDispatcher.java?rev=1445800&r1=1445799&r2=1445800&view=diff
==============================================================================
--- hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/errorhandling/ForeignExceptionDispatcher.java (original)
+++ hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/errorhandling/ForeignExceptionDispatcher.java Wed Feb 13 18:22:42 2013
@@ -87,7 +87,9 @@ public class ForeignExceptionDispatcher 
   @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());
     }
   }