Permalink
Browse files

Don't attempt to write a null message

  • Loading branch information...
ndw committed Apr 14, 2016
1 parent 3510f54 commit 20e41ea4b26f7001a7c77e9d8e8ae1ce9592421b
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/main/java/com/xmlcalabash/runtime/XTry.java
@@ -117,8 +117,8 @@ public void run() throws SaxonApiException {
// Hey, no one reported this exception. We better do it.
treeWriter.addStartElement(c_error);
- String message = xe.getMessage();
StructuredQName qCode = null;
+ String message = xe.getMessage();
if (xe instanceof XPathException) {
XPathException xxx = (XPathException) xe;
@@ -162,6 +162,10 @@ public void run() throws SaxonApiException {
}
}
+ if (message == null) {
+ message = "";
+ }
+
treeWriter.startContent();
treeWriter.addText(message);
treeWriter.addEndElement();

0 comments on commit 20e41ea

Please sign in to comment.