tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: r513855 - /incubator/tuscany/java/sca/core-samples/standalone/calculator/src/main/java/calculator/CalculatorClient.java
Date Fri, 02 Mar 2007 17:24:23 GMT
Author: jboynes
Date: Fri Mar  2 09:24:22 2007
New Revision: 513855

URL: http://svn.apache.org/viewvc?view=rev&rev=513855
Log:
print usage for bad command line rather than throw an exception

Modified:
    incubator/tuscany/java/sca/core-samples/standalone/calculator/src/main/java/calculator/CalculatorClient.java

Modified: incubator/tuscany/java/sca/core-samples/standalone/calculator/src/main/java/calculator/CalculatorClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/core-samples/standalone/calculator/src/main/java/calculator/CalculatorClient.java?view=diff&rev=513855&r1=513854&r2=513855
==============================================================================
--- incubator/tuscany/java/sca/core-samples/standalone/calculator/src/main/java/calculator/CalculatorClient.java
(original)
+++ incubator/tuscany/java/sca/core-samples/standalone/calculator/src/main/java/calculator/CalculatorClient.java
Fri Mar  2 09:24:22 2007
@@ -36,7 +36,8 @@
     public int main(String[] args) throws Exception {
         
         if(args.length != 3) {
-            throw new IllegalArgumentException("Usage <add|substract|multiply|divide>
<operand1> <operand2>");
+            System.err.println("usage: <add|substract|multiply|divide> <operand1>
<operand2>");
+            return 1;
         }
 
         double result;



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message