Revisão | 9171403d2c6cc00737471cfac6ec1a3e190251a9 (tree) |
---|---|
Hora | 2012-11-08 12:22:07 |
Autor | Katsuhiko Nishimra <ktns.87@gmai...> |
Commiter | Katsuhiko Nishimra |
Constructor of MolDSException receives boost::format
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@1108 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -18,11 +18,15 @@ | ||
18 | 18 | //************************************************************************// |
19 | 19 | #include<string> |
20 | 20 | #include<stdexcept> |
21 | +#include<boost/format.hpp> | |
21 | 22 | #include"MolDSException.h" |
22 | 23 | using namespace std; |
23 | 24 | namespace MolDS_base{ |
24 | 25 | MolDSException::MolDSException(string cause) : domain_error(cause){ |
25 | 26 | } |
27 | + | |
28 | +MolDSException::MolDSException(const boost::format& cause) : domain_error(cause.str()){ | |
29 | +} | |
26 | 30 | } |
27 | 31 | |
28 | 32 |
@@ -22,6 +22,9 @@ namespace MolDS_base{ | ||
22 | 22 | class MolDSException : public std::domain_error { |
23 | 23 | public: |
24 | 24 | explicit MolDSException(std::string cause); |
25 | +#ifdef BOOST_FORMAT_HPP | |
26 | + MolDSException(const boost::format& cause); | |
27 | +#endif | |
25 | 28 | private: |
26 | 29 | }; |
27 | 30 | } |