summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 271b312..c514e33 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -19,6 +19,7 @@
#include <iostream>
#include <libgnomecanvasmm.h>
+#include <glibmm/exception.h>
#include "Patchage.h"
#include "JackDriver.h"
@@ -39,8 +40,14 @@ int main(int argc, char** argv)
app.run(*patchage.window());
- } catch (std::string msg) {
- std::cerr << "Caught exception, aborting. Error message was: " << msg << std::endl;
+ } catch (std::exception& e) {
+ std::cerr << "Caught exception, aborting. Error message was: "
+ << e.what() << std::endl;
+ return 1;
+
+ } catch (Glib::Exception& e) {
+ std::cerr << "Caught exception, aborting. Error message was: "
+ << e.what() << std::endl;
return 1;
}