cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/3] git commit: exit(1) on IOException trying to read from a file patch by Steve Peters; reviewed by jbellis for CASSANDRA-5247
Date Sat, 29 Jun 2013 18:37:33 GMT
Updated Branches:
  refs/heads/cassandra-1.2 d265fded8 -> 8c2a28050
  refs/heads/trunk 66f301457 -> 0888c2e18


exit(1) on IOException trying to read from a file
patch by Steve Peters; reviewed by jbellis for CASSANDRA-5247


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

Branch: refs/heads/cassandra-1.2
Commit: 8c2a28050f67dbd9949d28a9e68a256d0658d036
Parents: d265fde
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Sat Jun 29 11:36:41 2013 -0700
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Sat Jun 29 11:36:47 2013 -0700

----------------------------------------------------------------------
 src/java/org/apache/cassandra/cli/CliMain.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8c2a2805/src/java/org/apache/cassandra/cli/CliMain.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cli/CliMain.java b/src/java/org/apache/cassandra/cli/CliMain.java
index a347747..547f642 100644
--- a/src/java/org/apache/cassandra/cli/CliMain.java
+++ b/src/java/org/apache/cassandra/cli/CliMain.java
@@ -266,14 +266,14 @@ public class CliMain
             try
             {
                 fileReader = new FileReader(sessionState.filename);
+                evaluateFileStatements(new BufferedReader(fileReader));
             }
             catch (IOException e)
             {
                 sessionState.err.println(e.getMessage());
-                return;
+                System.exit(1);
             }
 
-            evaluateFileStatements(new BufferedReader(fileReader));
             return;
         }
 


Mime
View raw message