Skip to content
Snippets Groups Projects
Commit f4a54f1a authored by felmer's avatar felmer
Browse files

changes which allow better testability of code using SystemExit

SVN: 780
parent 51610855
No related branches found
No related tags found
No related merge requests found
......@@ -26,12 +26,19 @@ public class SystemExit implements IExitHandler
/** The one and only one instance. */
public static final IExitHandler SYSTEM_EXIT = new SystemExit();
//@Private
public static boolean throwException;
private SystemExit()
{
}
public void exit(int exitCode)
{
if (throwException)
{
throw new RuntimeException("Exit called with exit code " + exitCode);
}
System.exit(exitCode);
}
......
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