Changeset 289 in pacpusframework for trunk/src/DBITEPlayer


Ignore:
Timestamp:
03/26/14 21:27:40 (10 years ago)
Author:
Marek Kurdej
Message:

Minor: more diagnostic information on exceptions in DbitePlayer and PacpusSensor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/DBITEPlayer/src/main.cpp

    r221 r289  
    4343#include <boost/assert.hpp>
    4444#include <boost/cstdlib.hpp>
     45#include <boost/exception/diagnostic_information.hpp>
    4546
    4647using namespace pacpus;
     
    5657
    5758    PacpusApplication app(argc, argv);
    58     ComponentManager * mgr = ComponentManager::getInstance();
     59    ComponentManager* mgr = ComponentManager::getInstance();
    5960
    6061    static ComponentFactory<DbtPlyEngine> factoryDbtPlyEngine("DbtPlyEngine");
     
    7980    }
    8081
    81     int exitStatus;
     82    int exitStatus = boost::exit_exception_failure;
    8283    try {
    8384        // start all the components (engine, trigger, user interface and the DBT file managers)
     
    8788        // stop all components before exiting app
    8889        mgr->stop();
    89 
    9090        mgr->destroy();
    9191    } 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());
    9499    }
    95100
Note: See TracChangeset for help on using the changeset viewer.