xgroup.run();
} catch (Exception xe) {
TreeWriter treeWriter = new TreeWriter(runtime);
treeWriter.startDocument(step.getNode().getBaseURI());
treeWriter.addStartElement(c_errors);
treeWriter.startContent();
boolean reported = false;
for (XdmNode doc : runtime.getXProcData().errors()) {
treeWriter.addSubtree(doc);
reported = true;