drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [13/16] incubator-drill git commit: Add handling when a null exception is logged.
Date Wed, 12 Nov 2014 04:11:30 GMT
Add handling when a null exception is logged.


Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/ab154b5e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/ab154b5e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/ab154b5e

Branch: refs/heads/master
Commit: ab154b5e3acc3461e327643f30211fa5904d462b
Parents: 60736de
Author: Jacques Nadeau <jacques@apache.org>
Authored: Tue Nov 11 09:45:03 2014 -0800
Committer: Jacques Nadeau <jacques@apache.org>
Committed: Tue Nov 11 16:48:45 2014 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/drill/exec/work/ErrorHelper.java    | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ab154b5e/exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java
index 6a9cab5..025a8de 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java
@@ -20,6 +20,7 @@ package org.apache.drill.exec.work;
 import java.util.UUID;
 import java.util.regex.Pattern;
 
+import org.apache.drill.common.exceptions.DrillException;
 import org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint;
 import org.apache.drill.exec.proto.UserBitShared.DrillPBError;
 import org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper;
@@ -61,6 +62,9 @@ public class ErrorHelper {
     builder.setEndpoint(endpoint);
     builder.setErrorId(id);
     builder.setMessage(message);
+    if(t == null){
+      t = new DrillException("Undefined failure occurred.");
+    }
     builder.setException(getWrapper(t));
 
     // record the error to the log for later reference.


Mime
View raw message