} catch (java.lang.Throwable ex) {
// notify any listeners about close
for (Enumeration e = listeners.elements(); e.hasMoreElements();) {
XStreamListener l = (XStreamListener) e.nextElement();
l.error(new com.sun.star.uno.Exception(ex.getClass().getName() + ": " + ex.getMessage()));
}
if (statsp != null) {
statsp.println(ex.getClass().getName() + ": " + ex.getMessage());
ex.printStackTrace(statsp);
}