diff options
author | Jack Lloyd <[email protected]> | 2015-12-11 09:42:06 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-12-11 09:42:06 -0500 |
commit | 6b9a3a534071ef84c121c406559f8fc7ad546104 (patch) | |
tree | c11480ad1f07e443ba4e992fefcd618b532c2e93 /src/tests/test_mceliece.cpp | |
parent | 79a51627ee11f4d7f55d589751b30463d1f02a76 (diff) |
Reroot the exception hierarchy into a toplevel Exception class
As the alternatives are unfortunate for applications trying to catch
all library errors, and it seems deriving from std::runtime_error
causes problems with MSVC DLLs (GH #340)
Effectively reverts 2837e915d82e43
Diffstat (limited to 'src/tests/test_mceliece.cpp')
-rw-r--r-- | src/tests/test_mceliece.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/test_mceliece.cpp b/src/tests/test_mceliece.cpp index a2cf5bf8f..88379f2ea 100644 --- a/src/tests/test_mceliece.cpp +++ b/src/tests/test_mceliece.cpp @@ -103,7 +103,7 @@ class McEliece_Tests : public Test { std::unique_ptr<Botan::HashFunction> hash(Botan::HashFunction::create(hash_algo)); if(!hash) - throw std::runtime_error("Hash " + hash_algo + " not available"); + throw Test_Error("Hash " + hash_algo + " not available"); hash->update(key.pkcs8_private_key()); return Botan::hex_encode(hash->final()); @@ -113,7 +113,7 @@ class McEliece_Tests : public Test { std::unique_ptr<Botan::HashFunction> hash(Botan::HashFunction::create(hash_algo)); if(!hash) - throw std::runtime_error("Hash " + hash_algo + " not available"); + throw Test_Error("Hash " + hash_algo + " not available"); hash->update(key.x509_subject_public_key()); return Botan::hex_encode(hash->final()); |