- _raise(Events.DOCUMENT_UPDATE, client.getSessionUrn(), null, client);
+ if (!_raise(Events.DOCUMENT_UPDATE, client.getSessionUrn(), null, client))
+ {
+ log.info("Recovering from errors or exceptions generated by client application");
+ if (client.cdocument!=null)
+ {
+ try {
+ client.tidyAwaySessionDocumentState();
+ }
+ catch (Exception e)
+ {
+ log.warn("Exception generated by vamsas library - when tidying away session document:",e);
+ }
+ catch (Error e)
+ {
+ log.error("LIBRARY Implementation error - when tidying away session document:",e);
+ }
+ }
+
+ }