use of org.drools.compiler.lang.dsl.DSLMappingParseException in project drools-wb by kiegroup.
the class DSLTextEditorServiceImpl method makeValidationMessages.
private List<ValidationMessage> makeValidationMessages(final DSLTokenizedMappingFile dslLoader) {
final List<ValidationMessage> messages = new ArrayList<ValidationMessage>();
for (final Object o : dslLoader.getErrors()) {
if (o instanceof DSLMappingParseException) {
final DSLMappingParseException dslMappingParseException = (DSLMappingParseException) o;
messages.add(makeNewValidationMessage(dslMappingParseException));
} else if (o instanceof Exception) {
final Exception e = (Exception) o;
messages.add(makeNewValidationMessage(e));
} else {
messages.add(makeNewValidationMessage(o));
}
}
return messages;
}
Aggregations