From 646aa3a7b62a36b6753098d51d5c6102e15555e6 Mon Sep 17 00:00:00 2001 From: brinn <brinn> Date: Tue, 12 Aug 2008 12:24:11 +0000 Subject: [PATCH] change: add catch clause and TODO for having a cleaner interface for self-test failures SVN: 7816 --- .../java/ch/systemsx/cisd/datamover/SelfTest.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/datamover/source/java/ch/systemsx/cisd/datamover/SelfTest.java b/datamover/source/java/ch/systemsx/cisd/datamover/SelfTest.java index 90de058da07..a3f0b8319f3 100644 --- a/datamover/source/java/ch/systemsx/cisd/datamover/SelfTest.java +++ b/datamover/source/java/ch/systemsx/cisd/datamover/SelfTest.java @@ -64,12 +64,20 @@ public class SelfTest try { selfTestable.check(); + } catch (EnvironmentFailureException ex) + { + notificationLog.error("Self-test failed for self testable '" + selfTestable + + "'. This self-testable is remote and the resource may become " + + "available later, thus continuing anyway.", ex); + // TODO 2008-08-12, Bernd Rinn: ensure we never throw a + // ConfigurationFailureException in any SelfTestable if we are not sure that it + // is a configuration problem rather than a problem with the environment. Then, + // when this is done, remove this catch clause. } catch (ConfigurationFailureException ex) { notificationLog.error("Self-test failed for self testable '" + selfTestable + "'. This self-testable is remote and the resource may become " - + "available later, thus continuing anyway [error message: " - + ex.getMessage() + "."); + + "available later, thus continuing anyway.", ex); } } else { -- GitLab