Skip to content
Snippets Groups Projects
Commit efd7cac6 authored by brinn's avatar brinn
Browse files

change:

- better define contract of self-test (what exception in which case)
- improve reporting when self-test fails

SVN: 423
parent 9bb09159
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,9 @@
package ch.systemsx.cisd.common.utilities;
import ch.systemsx.cisd.common.exceptions.ConfigurationFailureException;
import ch.systemsx.cisd.common.exceptions.EnvironmentFailureException;
/**
* A role that can perform a self test.
*
......@@ -25,10 +28,12 @@ public interface ISelfTestable
{
/**
* Checks this <code>ISelfTestable</code>. Any failure needs to be properly logged.
* Checks this <code>ISelfTestable</code>. Implementations are not supposed to do any failure logging (debug
* logging is OK), but the caller is in charge of this.
*
* @throws RuntimeException If the self test fails.
* @throws ConfigurationFailureException If the self-test fails due to a configuration problem.
* @throws EnvironmentFailureException If the self-test fails due to a problem in the environment.
*/
public void check();
public void check() throws EnvironmentFailureException, ConfigurationFailureException;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment