Commit 8dc957c4 authored by R.W.Majeed's avatar R.W.Majeed
Browse files

more verbose message for NPE

parent 7571f4e6
......@@ -42,8 +42,10 @@ public class TableParser implements AutoCloseable{
Column[] columns = table.getColumns();
xpaths = new XPathExpression[columns.length];
for( int i=0; i<columns.length; i++ ){
String expr = columns[i].getXPath();
try {
xpaths[i] = xpath.compile(columns[i].getXPath());
Objects.requireNonNull(expr, "xpath required for column "+table.getId()+"."+columns[i].getHeader());
xpaths[i] = xpath.compile(expr);
} catch (XPathExpressionException e) {
throw new ExportException("Unable to compile XPath expression for "+table.getId()+"."+columns[i].getHeader(), e);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment