Changeset 280 in pacpusframework for trunk/src/PacpusLib
- Timestamp:
- Mar 20, 2014, 11:59:05 AM (11 years ago)
- Location:
- trunk/src/PacpusLib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/PacpusLib/ComponentBase.cpp
r279 r280 509 509 } catch (po::error& e) { 510 510 LOG_WARN(e.what()); 511 throw PacpusException(e.what());511 BOOST_THROW_EXCEPTION(PacpusException(e.what())); 512 512 } 513 513 -
trunk/src/PacpusLib/PacpusApplication.cpp
r222 r280 89 89 try { 90 90 return QApplication::notify(receiver, ev); 91 } catch (PacpusException 91 } catch (PacpusException& e) { 92 92 (void)e; // unused 93 LOG_ERROR("PacpusException thrown:" << e.what() );94 } catch (boost::exception 93 LOG_ERROR("PacpusException thrown:" << e.what() << "\n" << boost::diagnostic_information(e)); 94 } catch (boost::exception& e) { 95 95 (void)e; // unused 96 96 LOG_ERROR("boost::exception thrown:" << boost::diagnostic_information(e)); 97 } catch (std::exception 97 } catch (std::exception& e) { 98 98 (void)e; // unused 99 99 LOG_ERROR("std::exception thrown:" << e.what()); … … 125 125 std::stringstream errorMessage; 126 126 errorMessage << "received signal number " << signal; 127 throw PacpusException(errorMessage.str()); 127 BOOST_THROW_EXCEPTION(PacpusException(errorMessage.str()) 128 << errinfo_signal(signal) 129 ); 128 130 } -
trunk/src/PacpusLib/PacpusException.cpp
r156 r280 10 10 using namespace pacpus; 11 11 12 PacpusException::PacpusException( const std::string& what)13 : mWhat(what)12 PacpusException::PacpusException(std::string const& what) 13 : std::runtime_error(what) 14 14 { 15 15 } 16 16 17 PacpusException::~PacpusException() throw()17 PacpusException::~PacpusException() 18 18 { 19 19 } 20 21 const char * PacpusException::what() const throw()22 {23 return mWhat.c_str();24 } -
trunk/src/PacpusLib/XmlConfigFile.cpp
r231 r280 8 8 9 9 #include <Pacpus/kernel/Log.h> 10 #include <Pacpus/kernel/PacpusException.h> 10 11 11 12 #include <cassert> … … 67 68 } else { 68 69 LOG_ERROR("cannot open XML document " << kXmlConfigFilename); 69 throw "cannot open XML document file";70 BOOST_THROW_EXCEPTION(PacpusException("cannot open XML document file")); 70 71 } 71 72 }
Note:
See TracChangeset
for help on using the changeset viewer.