diff options
author | chriseth <chris@ethereum.org> | 2017-10-18 20:53:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-18 20:53:45 +0800 |
commit | 9cf6e910bd2b90d0c9415d9c257f85fe0c518de8 (patch) | |
tree | 6423baec5e26bbe174005c1a89d978cae15015d8 /libdevcore | |
parent | bdeb9e52a2211510644fb53df93fb98258b40a65 (diff) | |
parent | c85c41880ad1c996517b0ae14f98678b1e6c5613 (diff) | |
download | dexon-solidity-9cf6e910bd2b90d0c9415d9c257f85fe0c518de8.tar dexon-solidity-9cf6e910bd2b90d0c9415d9c257f85fe0c518de8.tar.gz dexon-solidity-9cf6e910bd2b90d0c9415d9c257f85fe0c518de8.tar.bz2 dexon-solidity-9cf6e910bd2b90d0c9415d9c257f85fe0c518de8.tar.lz dexon-solidity-9cf6e910bd2b90d0c9415d9c257f85fe0c518de8.tar.xz dexon-solidity-9cf6e910bd2b90d0c9415d9c257f85fe0c518de8.tar.zst dexon-solidity-9cf6e910bd2b90d0c9415d9c257f85fe0c518de8.zip |
Merge pull request #3099 from ethereum/develop
Merge develop into release for 0.4.18.
Diffstat (limited to 'libdevcore')
-rw-r--r-- | libdevcore/Exceptions.cpp | 10 | ||||
-rw-r--r-- | libdevcore/Whiskers.cpp | 8 |
2 files changed, 14 insertions, 4 deletions
diff --git a/libdevcore/Exceptions.cpp b/libdevcore/Exceptions.cpp index f422d926..f204dbc2 100644 --- a/libdevcore/Exceptions.cpp +++ b/libdevcore/Exceptions.cpp @@ -24,10 +24,14 @@ using namespace dev; char const* Exception::what() const noexcept { + // Return the comment if available. if (string const* cmt = comment()) - return cmt->c_str(); - else - return nullptr; + return cmt->data(); + + // Fallback to base what(). + // Boost accepts nullptr, but the C++ standard doesn't + // and crashes on some platforms. + return std::exception::what(); } string Exception::lineInfo() const diff --git a/libdevcore/Whiskers.cpp b/libdevcore/Whiskers.cpp index b0a4c755..a6db35c8 100644 --- a/libdevcore/Whiskers.cpp +++ b/libdevcore/Whiskers.cpp @@ -90,7 +90,13 @@ string Whiskers::replace( string tagName(_match[1]); if (!tagName.empty()) { - assertThrow(_parameters.count(tagName), WhiskersError, "Value for tag " + tagName + " not provided."); + assertThrow( + _parameters.count(tagName), + WhiskersError, + "Value for tag " + tagName + " not provided.\n" + + "Template:\n" + + _template + ); return _parameters.at(tagName); } else |