import mir.producer.ProducerFactory;
import mir.producer.ProducerNode;
import mir.producer.SimpleProducerVerb;
-import mir.util.ExceptionFunctions;
+import mir.util.ExceptionRoutines;
import mir.util.xml.XMLParserEngine;
import mir.util.xml.XMLParserExc;
import mir.util.xml.XMLParserFailure;
public ProducerConfigReader() {
super();
- };
+ }
public void parse(Reader aReader, ProducerNodeBuilderLibrary aBuilderLibrary, List aProducerFactories) throws ProducerConfigFailure {
try {
}
catch (Throwable e) {
- Throwable root = ExceptionFunctions.traceCauseException(e);
+ Throwable root = ExceptionRoutines.traceCauseException(e);
if ((root instanceof XMLParserExc) && ((XMLParserExc) root).getHasLocation()) {
XMLParserExc f = (XMLParserExc) root;
}
catch (Throwable e) {
- Throwable root = ExceptionFunctions.traceCauseException(e);
+ Throwable root = ExceptionRoutines.traceCauseException(e);
if ((root instanceof XMLParserExc) && ((XMLParserExc) root).getHasLocation()) {
XMLParserExc f = (XMLParserExc) root;
if (aTag.equals("producers")) {
return new ProducersSectionHandler(producers);
}
- else
- throw new XMLParserExc("Tag 'producers' expected, tag '"+aTag+"' found");
+ throw new XMLParserExc("Tag 'producers' expected, tag '"+aTag+"' found");
}
public void endElement(mir.util.xml.SectionHandler aHandler) {
throw new XMLParserExc("Verbs already processed");
if (body!=null)
throw new XMLParserExc("Verbs should come before body");
- else
- return new ProducerVerbsSectionHandler();
+ return new ProducerVerbsSectionHandler();
}
else if (aTag.equals("body")) {
if (body==null)
return new ProducerNodeSectionHandler();
- else
- throw new XMLParserExc("Body already processed");
+ throw new XMLParserExc("Body already processed");
}
throw new XMLParserExc("Unexpected tag: '"+aTag+"'");
}
return new ProducerNodeSectionHandler();
}
- else
- throw new XMLParserExc("Only 'verb' tags allowed here, '" + aTag + "' encountered.");
+ throw new XMLParserExc("Only 'verb' tags allowed here, '" + aTag + "' encountered.");
}
public void endElement(mir.util.xml.SectionHandler aHandler) {
if (producerNode.getNrSubNodes()==1) {
return producerNode.getSubNode(0);
}
- else {
- return producerNode;
- }
+ return producerNode;
}
public void finishSection() {