kfaraz commented on code in PR #16470:
URL: https://github.com/apache/druid/pull/16470#discussion_r1622208025


##########
processing/src/main/java/org/apache/druid/error/InvalidInput.java:
##########
@@ -35,6 +35,37 @@ public static DruidException exception(Throwable t, String 
msg, Object... args)
     return DruidException.fromFailure(new InvalidInput(t, msg, args));
   }
 
+  /**
+   * evalues a condition. If it's false, it throws the appropriate 
DruidException
+   *
+   * @param condition - boolean condition to validate
+   * @param msg - passed through to InvalidInput.exception()
+   * @param args - passed through to InvalidInput.exception()
+   */
+  public static void conditionalException(boolean condition, String msg, 
Object... args)

Review Comment:
   Sounds good.



-- 
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: commits-unsubscr...@druid.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to