Adding part of exception handling
diff --git a/src/main.cpp b/src/main.cpp
index 4e58e77..44a67ee 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -53,10 +53,16 @@
// app.setWindowIcon(QIcon(":/demo.icns"));
- Ptr<ContactStorage> contactStorage = Ptr<ContactStorage>::Create();
+ Ptr<ContactStorage> contactStorage = NULL;
+ try{
+ contactStorage = Ptr<ContactStorage>::Create();
+ }catch(std::exception& e){
+ std::cerr << e.what() << std::endl;
+ exit(1);
+ }
Ptr<DnsStorage> dnsStorage = Ptr<DnsStorage>::Create();
Ptr<ContactManager> contactManager = Ptr<ContactManager>(new ContactManager(contactStorage, dnsStorage));
-
+
ContactPanel contactPanel(contactManager);
contactPanel.show ();