aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-05-31 19:55:17 -0400
committerJack Lloyd <[email protected]>2018-05-31 19:55:17 -0400
commit07386822ffecc6baf5cc5a69fb61d747fd4088b6 (patch)
tree4376ecc159bac6e6e2001da02eeaffcb564ff467 /src/tests
parentb3e4f1421b432e239ce76d72869a0e28089748f5 (diff)
Improve error message in tests on invalid hex input
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/tests.cpp7
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());
}
}