Changeset 280 in pacpusframework for trunk/include


Ignore:
Timestamp:
Mar 20, 2014, 11:59:05 AM (11 years ago)
Author:
Marek Kurdej
Message:

Major: DbiteException uses boost::exception.

Location:
trunk/include/Pacpus/kernel
Files:
2 edited

Legend:

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

    r156 r280  
    1818#include <Pacpus/kernel/PacpusException.h>
    1919
     20#include <ios>
    2021#include <string>
    2122
     
    2930    /// Ctor.
    3031    /// @param what Information about the exception.
    31     DbiteException(const std::string & what);
     32    DbiteException(std::string const& what = "");
    3233
    3334    /// Dtor.
     
    3536};
    3637
     38typedef boost::error_info<struct tag_errinfo_ios_base_open_mode, std::ios_base::openmode> errinfo_ios_base_open_mode;
     39
    3740} // namespace pacpus
    3841
  • 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.