[rules-users] Drools fusion how to I catch an Exception

Wolfgang Laun wolfgang.laun at gmail.com
Wed Sep 5 09:53:00 EDT 2012


Perhaps do a "clean project"?

On 05/09/2012, RichardAmbridge <richard.ambridge at gmail.com> wrote:
> What is flagging an error for you?
>
> Eclipse plugin shows error, but it compiles.
>
> KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
> 		kbuilder.add(ResourceFactory.newClassPathResource("Sample.drl"),
> 				ResourceType.DRL);
> 		*KnowledgeBuilderErrors errors = kbuilder.getErrors();*
> 		if (errors.size() > 0) {
> 			for (KnowledgeBuilderError error : errors) {
> 				System.err.println(error);
> 			}
> 			throw new IllegalArgumentException("Could not parse knowledge.");
> 		}
>
> The getErrors() doesn't return any errors.
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Drools-fusion-how-to-I-catch-an-Exception-tp4019597p4019601.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list