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

RichardAmbridge richard.ambridge at gmail.com
Wed Sep 5 09:48:13 EDT 2012


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.


More information about the rules-users mailing list