Changeset 280 in pacpusframework for trunk/include/Pacpus/kernel/PacpusException.h


Ignore:
Timestamp:
03/20/14 11:59:05 (10 years ago)
Author:
Marek Kurdej
Message:

Major: DbiteException uses boost::exception.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/Pacpus/kernel/PacpusException.h

    r156 r280  
    1717#include <Pacpus/kernel/PacpusLibConfig.h>
    1818
    19 //#include <boost/exception/exception.hpp>
     19#include <boost/exception/exception.hpp>
     20#include <boost/exception/error_info.hpp>
    2021#include <exception>
    2122#include <string>
     
    2324#ifdef _MSC_VER
    2425#   pragma warning(push)
    25 #   pragma warning(disable: 4251)
     26#   pragma warning(disable: 4251 4275)
    2627#endif // _MSC_VER
    2728
    28 namespace pacpus {
     29namespace pacpus
     30{
    2931
    3032/// Base class for all exceptions in the framework
    3133class PACPUSLIB_API PacpusException
    32     : virtual public std::exception
    33     //, virtual public boost::exception
     34    : /*virtual*/ public std::runtime_error
     35    , virtual public boost::exception
    3436{
    3537public:
    3638    /// Ctor.
    3739    /// @param what Information about the exception.
    38     PacpusException(const std::string & what);
     40    PacpusException(std::string const& what = "");
    3941
    4042    /// Dtor.
    41     virtual ~PacpusException() throw();
    42 
    43     /// Gets more information about the error.
    44     ///
    45     /// @returns Message containing information about the error.
    46     virtual const char * what() const throw();
    47 
    48 protected:
    49     std::string mWhat;
     43    virtual ~PacpusException();
    5044};
    5145
    5246} // namespace pacpus
     47
     48typedef boost::error_info<struct tag_errinfo_signal, int> errinfo_signal;
    5349
    5450#ifdef _MSC_VER
Note: See TracChangeset for help on using the changeset viewer.