Changeset 201 in pacpusframework for trunk/src/PacpusLib/ComponentBase.cpp


Ignore:
Timestamp:
Oct 28, 2013, 3:24:14 PM (11 years ago)
Author:
Marek Kurdej
Message:

Major: rethrow PacpusException on parameter parsing, set configurationState to ComponentBase::CONFIGURED_FAILED.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/PacpusLib/ComponentBase.cpp

    r182 r201  
    99#include <Pacpus/kernel/ComponentManager.h>
    1010#include <Pacpus/kernel/Log.h>
     11#include <Pacpus/kernel/PacpusException.h>
    1112
    1213#include <boost/program_options/parsers.hpp>
     
    210211    vector<string> xargs = convertAttributesToArgumentVector(cfg.getProperties());
    211212   
    212     boost::program_options::variables_map vm;
     213    po::variables_map vm;
    213214    try {
    214215        po::store(
     
    220221        po::notify(vm);
    221222    } catch (po::error & e) {
    222         LOG_ERROR(e.what());
    223         throw;
     223        LOG_WARN(e.what());
     224        throw PacpusException(e.what());
    224225    }
    225226
Note: See TracChangeset for help on using the changeset viewer.