From 6ec74b775b9f0f5d313ca24ed312442687d60474 Mon Sep 17 00:00:00 2001
From: ribeaudc <ribeaudc>
Date: Fri, 16 Nov 2007 09:31:21 +0000
Subject: [PATCH] change: - Extract the exit message.

SVN: 2608
---
 .../systemsx/cisd/common/utilities/SystemExit.java   | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

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 f81fcdf0c69..f3a5399099d 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);
     }
-- 
GitLab