Add line info to serious exceptions.

This commit is contained in:
chriseth
2017-02-24 19:32:41 +01:00
parent d2c79bf8e9
commit 7a24a5764e
3 changed files with 20 additions and 3 deletions
+3
View File
@@ -41,6 +41,9 @@ struct Exception: virtual std::exception, virtual boost::exception
Exception(std::string _message = std::string()): m_message(std::move(_message)) {}
const char* what() const noexcept override { return m_message.empty() ? std::exception::what() : m_message.c_str(); }
/// @returns "FileName:LineNumber" referring to the point where the exception was thrown.
std::string lineInfo() const;
private:
std::string m_message;
};