Github user cestella commented on a diff in the pull request: https://github.com/apache/incubator-metron/pull/346#discussion_r86792656 --- Diff: metron-platform/metron-common/src/main/java/org/apache/metron/common/stellar/StellarPredicateProcessor.java --- @@ -51,6 +48,11 @@ public Boolean parse( String rule if(rule == null || isEmpty(rule.trim())) { return true; } - return super.parse(rule, variableResolver, functionResolver, context); + try { + return super.parse(rule, variableResolver, functionResolver, context); + } catch (ClassCastException e) { + // predicate must return boolean + throw new IllegalArgumentException(String.format("The rule '%s' does not return a boolean value.", rule)); --- End diff -- Can you pass in `e` as an argument to the IAE so the user can tell the type that was returned. Alternatively, you could add e.getMessage() to the IAE message.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---