From: jprocter Date: Mon, 21 May 2007 12:37:50 +0000 (+0000) Subject: log validation errors which cause the 'mergeRoots' call to fail. X-Git-Tag: Release_0.2~119 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ae13f473eb7580171784b6a3c8eb6e3afc5ef152;p=vamsas.git log validation errors which cause the 'mergeRoots' call to fail. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@401 be28352e-c001-0410-b1a7-c7978e42abec --- diff --git a/src/uk/ac/vamsas/client/simpleclient/ClientDocument.java b/src/uk/ac/vamsas/client/simpleclient/ClientDocument.java index db3d51a..9513668 100644 --- a/src/uk/ac/vamsas/client/simpleclient/ClientDocument.java +++ b/src/uk/ac/vamsas/client/simpleclient/ClientDocument.java @@ -159,6 +159,7 @@ public class ClientDocument extends uk.ac.vamsas.client.ClientDocument implement return i; return -1; } + /** * verify that newr version is really an intact version of the * @param newVersion (may be modified) @@ -173,15 +174,27 @@ public class ClientDocument extends uk.ac.vamsas.client.ClientDocument implement _registerObject(newVersion); // TODO: check - this call hasn't been tested. // Should retrieve original version and compare - unless local hashes can be used to determine if resultSet has been truncated. // just do internal validation for moment. - if (newVersion.isValid()) + try { + newVersion.validate(); return true; + } + catch (Exception e) + { + log.error("Validation Exception for new vamsas root :"+newVersion.getVorbaId(),e); + } return false; } else { // redundant ? if (oldVersion.is__stored_in_document()) if (!newVersion.isRegistered()) _registerObject(newVersion); - if (newVersion.isValid()) + try { + newVersion.validate(); return true; + } + catch (Exception e) + { + log.error("Validation Exception for new vamsas root :"+newVersion.getVorbaId(),e); + } } return false; /**