Permalink
Browse files

Log debug messages for step classes that cannot be instantiated

  • Loading branch information...
ndw committed Feb 10, 2015
1 parent 907683a commit c432737f972186c7ba4962848f9bb968b878a0d3
Showing with 9 additions and 2 deletions.
  1. +9 −2 src/com/xmlcalabash/core/XProcConfiguration.java
@@ -36,6 +36,8 @@
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.Source;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.xml.sax.InputSource;
import static com.xmlcalabash.util.URIUtils.encode;
@@ -64,6 +66,8 @@
public static final QName _loader = new QName("", "loader");
public static final QName _exclude_inline_prefixes = new QName("", "exclude-inline-prefixes");
+ protected Logger logger = null;
+
public String saxonProcessor = "he";
public boolean schemaAware = false;
public Input saxonConfig = null;
@@ -139,6 +143,8 @@ public Processor getProcessor() {
}
private void init(String proctype, boolean schemaAware, Input saxoncfg) {
+ logger = LoggerFactory.getLogger(this.getClass());
+
if (schemaAware) {
proctype = "ee";
}
@@ -934,9 +940,10 @@ private void parseImplementation(XdmNode node) {
Class<?> klass = Class.forName(value);
implementations.put(name, klass);
} catch (ClassNotFoundException e) {
- // nop
+ logger.debug("Class not found: " + value);
} catch (NoClassDefFoundError e) {
- // nop
+ String msg = e.getMessage();
+ logger.debug("Cannot instantiate " + value + ", missing class: " + msg);
}
}
}

0 comments on commit c432737

Please sign in to comment.