/[gr2lib]/trunk/gr2lib_UnitTest/Program.cs
ViewVC logotype

Diff of /trunk/gr2lib_UnitTest/Program.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/gr2lib_UnitTest/Program.cs	2010/07/15 08:37:02	65
+++ trunk/gr2lib_UnitTest/Program.cs	2010/07/15 09:29:25	69
@@ -5,6 +5,7 @@
 using gr2lib.core;
 using gr2lib.core.apiversion;
 using gr2lib.core.exceptions;
+using gr2lib.core.helpers;
 
 namespace gr2lib_UnitTest
 {
@@ -36,9 +37,13 @@
                 }
                 
                 // parse commandline
-                if (args.Length == 2)
+                if (args.Length == 1)
                 {
-                    GrannyFilename = args[1];
+                    GrannyFilename = args[0];
+                }
+                else if (args.Length > 1)
+                {
+                    throw new InvalidOperationException("ERROR: Recieved Invalid Commandline: " + new arraytostring<string,string[]>(args));
                 }
 
                 if (System.IO.File.Exists(GrannyFilename))
@@ -56,11 +61,11 @@
             }
             catch (granny2apiloadexception ex)
             {
-                Console.WriteLine(ex.ToString());
+                Console.WriteLine(ex.Message);
             }
             catch (Exception ex)
             {
-                Console.WriteLine(ex.ToString());
+                Console.WriteLine(ex.Message);
             }
         }
     }

 

  ViewVC Help
Powered by ViewVC 1.1.22