diff DeDupe.cpp @ 9:b5943e4bf676

Fix up header includes. Introduce outer catch. Fix coding style. Remove spurious debug output.
author Tom Fredrik Blenning Klaussen <bfg@blenning.no>
date Wed, 22 Aug 2012 18:48:07 +0200
parents 5e4985407feb
children 0114be0b5ad4
line wrap: on
line diff
--- a/DeDupe.cpp	Wed Aug 22 18:18:20 2012 +0200
+++ b/DeDupe.cpp	Wed Aug 22 18:48:07 2012 +0200
@@ -1,14 +1,24 @@
 #include "DataController.hpp"
+#include "Exception.hpp"
 
 #include <QtGui/QApplication>
 
+#include <iostream>
+
 int main(int argc, char *argv[]) {
 
-  QApplication app(argc, argv);
+  try {
+    QApplication app(argc, argv);
+
+    DataController dc(true);
 
-  DataController dc(true);
+    return app.exec();
+  }
+  catch (Exception& e) {
+    std::cerr << "Unrecoverable error" << e.toString().toStdString();
+    exit(1);
+  }
 
-  return app.exec();
 }