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_x509_path.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_x509_path.cpp')
-rw-r--r-- | src/tests/test_x509_path.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/test_x509_path.cpp b/src/tests/test_x509_path.cpp index 62051d021..149c6ec2a 100644 --- a/src/tests/test_x509_path.cpp +++ b/src/tests/test_x509_path.cpp @@ -52,7 +52,7 @@ class X509test_Path_Validation_Tests : public Test std::vector<Botan::X509_Certificate> certs = load_cert_file(test_dir + "/" + fsname); if(certs.empty()) - throw std::runtime_error("Failed to read certs from " + fsname); + throw Test_Error("Failed to read certs from " + fsname); Botan::Path_Validation_Result path_result = Botan::x509_path_validate( certs, default_restrictions, trusted, @@ -90,7 +90,7 @@ class X509test_Path_Validation_Tests : public Test { std::ifstream in(results_file); if(!in.good()) - throw std::runtime_error("Failed reading " + results_file); + throw Test_Error("Failed reading " + results_file); std::map<std::string, std::string> m; std::string line; @@ -105,7 +105,7 @@ class X509test_Path_Validation_Tests : public Test std::vector<std::string> parts = Botan::split_on(line, ':'); if(parts.size() != 2) - throw std::runtime_error("Invalid line " + line); + throw Test_Error("Invalid line " + line); m[parts[0]] = parts[1]; } |