First version of ImageScaler Widget
[mussa.git] / mussa.cxx
index bf20220d4513474dbc4ce808ebdd7c49a07a9233..6a54d01c0a24e95425cc59161d07ef7b3127cb92 100644 (file)
--- a/mussa.cxx
+++ b/mussa.cxx
@@ -10,6 +10,7 @@
 
 #include "gui/ConnWindow.hh"
 #include "alg/mussa_class.hh"
+#include "mussa_exceptions.hh"
 #include <iostream>
 using namespace std;
 
@@ -51,7 +52,7 @@ int main(int argc, char **argv)
     if ((run_mode == 'f') || (run_mode == 'n'))
     {
       err_msg = an_analysis.load_mupa_file(a_file_path);
-      err_msg = an_analysis.analyze(window, threshold, ana_mode, ent_thres);
+      an_analysis.analyze(window, threshold, ana_mode, ent_thres);
       //an_overlord.do_analysis();
     }
 
@@ -84,11 +85,6 @@ int main(int argc, char **argv)
   }
 }
 
-struct ParseError
-{
-  string err;
-  ParseError(const string& msg) : err(msg) { } ;
-};
 
 // minimal arg reading function, not very robust to errors
 char
@@ -129,7 +125,7 @@ parse_args(int argc, char **argv, string *a_file_path, int *window,
         {
           cout << "Error: \'" << an_arg;
           cout << "\' is not a valid analysis mode for -a argument" << endl; 
-          throw ParseError("not valid -a argument");
+          throw cmdline_error("not valid -a argument");
         }
         *a_file_path = * ++argv;
         i++;
@@ -147,7 +143,7 @@ parse_args(int argc, char **argv, string *a_file_path, int *window,
         {
           cout << "Error: \'" << an_arg;
           cout << "\' is not a valid run mode for -m argument" << endl; 
-          throw ParseError("bad argument -m");
+          throw cmdline_error("bad argument -m");
         }
       }
       else if (an_arg == "-w") // alternate window size arg