Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
f4a54f1a
Commit
f4a54f1a
authored
17 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/source/java/ch/systemsx/cisd/common/utilities/SystemExit.java
+7
-0
7 additions, 0 deletions
...ce/java/ch/systemsx/cisd/common/utilities/SystemExit.java
with
7 additions
and
0 deletions
common/source/java/ch/systemsx/cisd/common/utilities/SystemExit.java
+
7
−
0
View file @
f4a54f1a
...
...
@@ -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
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment