diff --git a/common/source/java/ch/systemsx/cisd/common/utilities/SystemExit.java b/common/source/java/ch/systemsx/cisd/common/utilities/SystemExit.java index f81fcdf0c6993f3def53c403d6d594cc61464f98..f3a5399099d51fd059ab53fdf4c491aaf7977c0a 100644 --- a/common/source/java/ch/systemsx/cisd/common/utilities/SystemExit.java +++ b/common/source/java/ch/systemsx/cisd/common/utilities/SystemExit.java @@ -18,17 +18,19 @@ package ch.systemsx.cisd.common.utilities; /** * Exit handler based on <code>System.exit()</code>. - * + * * @author Franz-Josef Elmer */ public class SystemExit implements IExitHandler { + public static final String EXIT_MESSAGE = "Exit called with exit code %d"; + /** The one and only one instance. */ public static final IExitHandler SYSTEM_EXIT = new SystemExit(); - - //@Private + + // @Private public static boolean throwException; - + private SystemExit() { } @@ -37,7 +39,7 @@ public class SystemExit implements IExitHandler { if (throwException) { - throw new RuntimeException("Exit called with exit code " + exitCode); + throw new RuntimeException(String.format(EXIT_MESSAGE, exitCode)); } System.exit(exitCode); }