Browse Source

Fixing access of boost::diagnostic_information() for Exceptions

- Figured it out with help from @arkpar. Thanks!
cl-refactor
Lefteris Karapetsas 10 years ago
parent
commit
9d9459d9ae
  1. 4
      libdevcore/Exceptions.h

4
libdevcore/Exceptions.h

@ -33,8 +33,8 @@ namespace dev
// base class for all exceptions
struct Exception: virtual std::exception, virtual boost::exception
{
Exception(std::string _message = {}) : m_message(std::move(_message)) {}
const char* what() const noexcept override { return m_message.c_str(); }
Exception(std::string _message = {}): m_message(std::move(_message)) {}
const char* what() const noexcept override { return m_message.empty() ? std::exception::what() : m_message.c_str(); }
private:
std::string m_message;

Loading…
Cancel
Save