compile fix: std::exception does only have a default constructor, the other

constrcutor is non-standard.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16835 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2007-01-24 16:24:47 +00:00
parent 801f807063
commit 753d2cafa5

View File

@ -33,14 +33,17 @@ class ExceptionMessage: public std::exception {
public: public:
ExceptionMessage(ExceptionType type, docstring const & title, ExceptionMessage(ExceptionType type, docstring const & title,
docstring const & details) docstring const & details)
: exception((to_utf8(title) + "\n" + to_utf8(details)).c_str()), : type_(type), title_(title), details_(details),
type_(type), title_(title), details_(details) {} message_(to_utf8(title_ + '\n' + details_)) {}
virtual ~ExceptionMessage() {} virtual const char * what() const throw() { return message_.c_str(); }
virtual ~ExceptionMessage() throw() {}
ExceptionType type_; ExceptionType type_;
docstring title_; docstring title_;
docstring details_; docstring details_;
// Needed because we may not return a temporary in what().
std::string message_;
}; };
} // namespace support } // namespace support