diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-10-02 18:41:47 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-10-02 18:41:47 +0800 |
commit | 71aca8c86d3721bcbf21f1f1649f07cf732f2090 (patch) | |
tree | 536ad5b2656566d7139e07eb8f313baac3fe66bd /libdevcore | |
parent | ba7c5d2305d3486ddd699637a881ee229627082f (diff) | |
download | dexon-solidity-71aca8c86d3721bcbf21f1f1649f07cf732f2090.tar.gz dexon-solidity-71aca8c86d3721bcbf21f1f1649f07cf732f2090.tar.zst dexon-solidity-71aca8c86d3721bcbf21f1f1649f07cf732f2090.zip |
Always return a valid pointer in Exception::what()
Diffstat (limited to 'libdevcore')
-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 |