kgyrtkirk commented on code in PR #14987:
URL: https://github.com/apache/druid/pull/14987#discussion_r1343531322


##########
processing/src/main/java/org/apache/druid/math/expr/FunctionalExpr.java:
##########
@@ -186,7 +187,15 @@ public String toString()
   @Override
   public ExprEval eval(ObjectBinding bindings)
   {
-    return function.apply(args, bindings);
+    try {
+      return function.apply(args, bindings);
+    }
+    catch (DruidException | ExpressionValidationException e) {
+      throw e;
+    }
+    catch (Exception e) {
+      throw DruidException.defensive().build(e, "Invocation of function '%s' 
encountered exception.", name);

Review Comment:
   yes - other exceptions are good; the case was like: an unexpected issue 
happened - and the NPE bubbled up to the top. Giving little-to-no detail to the 
user about what happened; as the message didn't contained anything usefull.
   
   I think if the user could see a bit friendlier message - it might give a 
starting point to either start narrowing it down the issue; or try to work it 
around



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to