aboutsummaryrefslogtreecommitdiffstats
path: root/libdevcore
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-10-02 22:46:25 +0800
committerGitHub <noreply@github.com>2017-10-02 22:46:25 +0800
commite7cea2f684cd754be0092093d97821604c6e65a2 (patch)
tree923d6026bd94d05f3f119e13a07e02a6fe4bd403 /libdevcore
parent6cbb726fb8970c6cb98e9b6a2928ef612ad9d760 (diff)
parent71aca8c86d3721bcbf21f1f1649f07cf732f2090 (diff)
downloaddexon-solidity-e7cea2f684cd754be0092093d97821604c6e65a2.tar
dexon-solidity-e7cea2f684cd754be0092093d97821604c6e65a2.tar.gz
dexon-solidity-e7cea2f684cd754be0092093d97821604c6e65a2.tar.bz2
dexon-solidity-e7cea2f684cd754be0092093d97821604c6e65a2.tar.lz
dexon-solidity-e7cea2f684cd754be0092093d97821604c6e65a2.tar.xz
dexon-solidity-e7cea2f684cd754be0092093d97821604c6e65a2.tar.zst
dexon-solidity-e7cea2f684cd754be0092093d97821604c6e65a2.zip
Merge pull request #3006 from ethereum/exceptions
Always return a valid pointer in Exception::what()
Diffstat (limited to 'libdevcore')
-rw-r--r--libdevcore/Exceptions.cpp4
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