diff options
author | Jack Lloyd <[email protected]> | 2018-05-31 19:55:17 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-05-31 19:55:17 -0400 |
commit | 07386822ffecc6baf5cc5a69fb61d747fd4088b6 (patch) | |
tree | 4376ecc159bac6e6e2001da02eeaffcb564ff467 | |
parent | b3e4f1421b432e239ce76d72869a0e28089748f5 (diff) |
Improve error message in tests on invalid hex input
-rw-r--r-- | src/tests/tests.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp index 076f85f0d..6a1148474 100644 --- a/src/tests/tests.cpp +++ b/src/tests/tests.cpp @@ -639,10 +639,11 @@ std::vector<uint8_t> VarMap::get_req_bin( { return Botan::hex_decode(i->second); } - catch(std::exception&) + catch(std::exception& e) { - throw Test_Error("Test invalid hex input '" + i->second + "'" + - + " for key " + key); + std::ostringstream oss; + oss << "Bad input '" << i->second << "'" << " for key " << key << " - " << e.what(); + throw Test_Error(oss.str()); } } |