commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [2/8] commons-rng git commit: More specific exception type.
Date Fri, 23 Dec 2016 13:41:36 GMT
More specific exception type.


Project: http://git-wip-us.apache.org/repos/asf/commons-rng/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-rng/commit/8c791b51
Tree: http://git-wip-us.apache.org/repos/asf/commons-rng/tree/8c791b51
Diff: http://git-wip-us.apache.org/repos/asf/commons-rng/diff/8c791b51

Branch: refs/heads/master
Commit: 8c791b51643981ee9b93952a7773a667a9b00c19
Parents: c6da1a9
Author: Gilles <erans@apache.org>
Authored: Fri Dec 23 12:47:18 2016 +0100
Committer: Gilles <erans@apache.org>
Committed: Fri Dec 23 12:47:18 2016 +0100

----------------------------------------------------------------------
 .../apache/commons/rng/examples/stress/RandomStressTester.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/8c791b51/commons-rng-examples/src/main/java/org/apache/commons/rng/examples/stress/RandomStressTester.java
----------------------------------------------------------------------
diff --git a/commons-rng-examples/src/main/java/org/apache/commons/rng/examples/stress/RandomStressTester.java
b/commons-rng-examples/src/main/java/org/apache/commons/rng/examples/stress/RandomStressTester.java
index a65eb6a..67be710 100644
--- a/commons-rng-examples/src/main/java/org/apache/commons/rng/examples/stress/RandomStressTester.java
+++ b/commons-rng-examples/src/main/java/org/apache/commons/rng/examples/stress/RandomStressTester.java
@@ -71,7 +71,7 @@ public class RandomStressTester {
         final File exec = new File(cmd.get(0));
         if (!exec.exists() ||
             !exec.canExecute()) {
-            throw new RuntimeException("Program is not executable: " + exec);
+            throw new IllegalArgumentException("Program is not executable: " + exec);
         }
 
         cmdLine = new ArrayList<String>(cmd);
@@ -81,7 +81,7 @@ public class RandomStressTester {
         if (!reportDir.exists() ||
             !reportDir.isDirectory() ||
             !reportDir.canWrite()) {
-            throw new RuntimeException("Invalid output directory: " + reportDir);
+            throw new IllegalArgumentException("Invalid output directory: " + reportDir);
         }
     }
 


Mime
View raw message