cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sn...@apache.org
Subject cassandra git commit: Improve UDF compilation error messages
Date Wed, 11 May 2016 08:48:19 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 0f1e838d1 -> 755c783f1


Improve UDF compilation error messages

patch by Robert Stupp; reviewed by Tyler Hobbs for CASSANDRA-11269


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/755c783f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/755c783f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/755c783f

Branch: refs/heads/trunk
Commit: 755c783f1786be18766b422b1cf4253cb5af1465
Parents: 0f1e838
Author: Robert Stupp <snazy@snazy.de>
Authored: Wed May 11 10:47:47 2016 +0200
Committer: Robert Stupp <snazy@snazy.de>
Committed: Wed May 11 10:47:47 2016 +0200

----------------------------------------------------------------------
 .../org/apache/cassandra/cql3/functions/JavaBasedUDFunction.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/755c783f/src/java/org/apache/cassandra/cql3/functions/JavaBasedUDFunction.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/functions/JavaBasedUDFunction.java b/src/java/org/apache/cassandra/cql3/functions/JavaBasedUDFunction.java
index ccfc7cf..87f5019 100644
--- a/src/java/org/apache/cassandra/cql3/functions/JavaBasedUDFunction.java
+++ b/src/java/org/apache/cassandra/cql3/functions/JavaBasedUDFunction.java
@@ -343,12 +343,13 @@ public final class JavaBasedUDFunction extends UDFunction
             // in case of an ITE, use the cause
             throw new InvalidRequestException(String.format("Could not compile function '%s'
from Java source: %s", name, e.getCause()));
         }
-        catch (VirtualMachineError e)
+        catch (InvalidRequestException | VirtualMachineError e)
         {
             throw e;
         }
         catch (Throwable e)
         {
+            logger.error(String.format("Could not compile function '%s' from Java source:%n%s",
name, javaSource), e);
             throw new InvalidRequestException(String.format("Could not compile function '%s'
from Java source: %s", name, e));
         }
     }


Mime
View raw message