-
Feature Request
-
Resolution: Unresolved
-
Major
-
None
-
Release Notes
-
Low
Compiling and adding a ruleflow via KnowledgeBuilder's add method often returns a simple null-pointer exception when information about the actual node that did not compile is available. While one can make a work-around using:
try
{ kbuilder.add(workFlow, workFlowtype); }catch(Exception t)
{ KnowledgeBuilderErrors errors = kbuilder.getErrors(); if (errors.size() > 0) for (KnowledgeBuilderError error: errors) System.err.println(error); } }
throw new IllegalArgumentException("Could not parse knowledge.");
}
...
}
throwing an exception with the actual build problem in the message seems appropriate so that users see an error describing the build problem when using traditional exception handling:
try
{ kbuilder.add(workFlow, workFlowtype); }catch (Exception t)
{ t.printStackTrace() }