tkobayas commented on code in PR #5922:
URL: 
https://github.com/apache/incubator-kie-drools/pull/5922#discussion_r1596414191


##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRLVisitorImpl.java:
##########
@@ -542,7 +542,7 @@ public BaseDescr 
visitLhsPatternBind(DRLParser.LhsPatternBindContext ctx) {
         } else if (ctx.lhsPattern().size() > 1) {
             return getOrDescrWithMultiplePatternDescr(ctx);
         } else {
-            throw new IllegalStateException("ctx.lhsPattern().size() == 0 : " 
+ ctx.getText());
+            return null; // only caused by a parser error

Review Comment:
   Users can read a parser error message, so no need of the explicit 
IllegalStateException.



-- 
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