diff options
author | chriseth <c@ethdev.com> | 2017-02-25 02:31:20 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-02-25 02:32:41 +0800 |
commit | 7a24a5764edf728f0caa14e7aa8f832d7e6f42e3 (patch) | |
tree | 3401978cddc171067362ab904364204b90c9e3d0 /libdevcore | |
parent | d2c79bf8e9400f783bf0feed34065882eae02a68 (diff) | |
download | dexon-solidity-7a24a5764edf728f0caa14e7aa8f832d7e6f42e3.tar.gz dexon-solidity-7a24a5764edf728f0caa14e7aa8f832d7e6f42e3.tar.zst dexon-solidity-7a24a5764edf728f0caa14e7aa8f832d7e6f42e3.zip |
Add line info to serious exceptions.
Diffstat (limited to 'libdevcore')
-rw-r--r-- | libdevcore/Exceptions.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libdevcore/Exceptions.h b/libdevcore/Exceptions.h index 4622774a..37cdbed9 100644 --- a/libdevcore/Exceptions.h +++ b/libdevcore/Exceptions.h @@ -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; }; |