diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-10-02 22:46:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-02 22:46:25 +0800 |
commit | e7cea2f684cd754be0092093d97821604c6e65a2 (patch) | |
tree | 923d6026bd94d05f3f119e13a07e02a6fe4bd403 | |
parent | 6cbb726fb8970c6cb98e9b6a2928ef612ad9d760 (diff) | |
parent | 71aca8c86d3721bcbf21f1f1649f07cf732f2090 (diff) | |
download | dexon-solidity-e7cea2f684cd754be0092093d97821604c6e65a2.tar.gz dexon-solidity-e7cea2f684cd754be0092093d97821604c6e65a2.tar.zst dexon-solidity-e7cea2f684cd754be0092093d97821604c6e65a2.zip |
Merge pull request #3006 from ethereum/exceptions
Always return a valid pointer in Exception::what()
-rw-r--r-- | libdevcore/Exceptions.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libdevcore/Exceptions.cpp b/libdevcore/Exceptions.cpp index f422d926..25fd1478 100644 --- a/libdevcore/Exceptions.cpp +++ b/libdevcore/Exceptions.cpp @@ -27,7 +27,9 @@ char const* Exception::what() const noexcept if (string const* cmt = comment()) return cmt->c_str(); else - return nullptr; + /// Boost accepts nullptr, but the C++ standard doesn't + /// and crashes on some platforms. + return std::exception::what(); } string Exception::lineInfo() const |