- Timestamp:
- Mar 26, 2014, 9:27:40 PM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/DBITEPlayer/src/main.cpp
r221 r289 43 43 #include <boost/assert.hpp> 44 44 #include <boost/cstdlib.hpp> 45 #include <boost/exception/diagnostic_information.hpp> 45 46 46 47 using namespace pacpus; … … 56 57 57 58 PacpusApplication app(argc, argv); 58 ComponentManager 59 ComponentManager* mgr = ComponentManager::getInstance(); 59 60 60 61 static ComponentFactory<DbtPlyEngine> factoryDbtPlyEngine("DbtPlyEngine"); … … 79 80 } 80 81 81 int exitStatus ;82 int exitStatus = boost::exit_exception_failure; 82 83 try { 83 84 // start all the components (engine, trigger, user interface and the DBT file managers) … … 87 88 // stop all components before exiting app 88 89 mgr->stop(); 89 90 90 mgr->destroy(); 91 91 } catch (PacpusException& e) { 92 LOG_WARN("Pacpus exception caught: " << e.what()); 93 exitStatus = boost::exit_exception_failure; 92 LOG_FATAL("PacpusException caught:" << e.what() << "\n" << boost::diagnostic_information(e)); 93 } catch (boost::exception& e) { 94 (void)e; // unused 95 LOG_FATAL("boost::exception caught:" << boost::diagnostic_information(e)); 96 } catch (std::exception& e) { 97 (void)e; // unused 98 LOG_FATAL("std::exception caught:" << e.what()); 94 99 } 95 100 -
trunk/src/PacpusLib/PacpusApplication.cpp
r280 r289 91 91 } catch (PacpusException& e) { 92 92 (void)e; // unused 93 LOG_ERROR("PacpusException thrown:" << e.what() << "\n" << boost::diagnostic_information(e));93 LOG_ERROR("PacpusException caught:" << e.what() << "\n" << boost::diagnostic_information(e)); 94 94 } catch (boost::exception& e) { 95 95 (void)e; // unused 96 LOG_ERROR("boost::exception thrown:" << boost::diagnostic_information(e));96 LOG_ERROR("boost::exception caught:" << boost::diagnostic_information(e)); 97 97 } catch (std::exception& e) { 98 98 (void)e; // unused 99 LOG_ERROR("std::exception thrown:" << e.what());99 LOG_ERROR("std::exception caught:" << e.what()); 100 100 } 101 101 return false; -
trunk/src/PacpusSensor/src/main.cpp
r162 r289 6 6 /// @version $Id: main.cpp 81 2013-01-11 22:31:02Z kurdejma $ 7 7 8 #include <QApplication>9 10 8 #include "ui/pacpusmainwindow.h" 11 9 #include <Pacpus/kernel/ComponentManager.h> 12 10 #include <Pacpus/kernel/Log.h> 13 11 #include <Pacpus/kernel/PacpusApplication.h> 12 #include <Pacpus/kernel/PacpusException.h> 13 14 #include <boost/cstdlib.hpp> 15 #include <boost/exception/diagnostic_information.hpp> 16 #include <QApplication> 14 17 #include <QThread> 15 18 #ifdef WIN32 … … 62 65 window.show(); 63 66 LOG_INFO("Current Thread " << QThread::currentThread()); 64 // save application exit status 65 int exitStatus = app.exec(); 66 // stop all components before exiting app 67 mgr->stop(); 68 69 mgr->destroy(); 67 68 int exitStatus = boost::exit_exception_failure; 69 try { 70 // save application exit status 71 exitStatus = app.exec(); 72 // stop all components before exiting app 73 mgr->stop(); 74 mgr->destroy(); 75 } catch (PacpusException& e) { 76 LOG_FATAL("PacpusException caught:" << e.what() << "\n" << boost::diagnostic_information(e)); 77 } catch (boost::exception& e) { 78 (void)e; // unused 79 LOG_FATAL("boost::exception caught:" << boost::diagnostic_information(e)); 80 } catch (std::exception& e) { 81 (void)e; // unused 82 LOG_FATAL("std::exception caught:" << e.what()); 83 } 70 84 71 85 #ifdef WIN32
Note:
See TracChangeset
for help on using the changeset viewer.