aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/exceptn.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-12-27 15:48:00 -0500
committerJack Lloyd <[email protected]>2017-09-19 22:30:41 -0400
commit12c4dfec24e999ab80ff3a45e0b837976d4c390c (patch)
tree7de91a2b86aec055800b8e046729fcc10a31d6d8 /src/lib/utils/exceptn.h
parent0c6c4e058109791a9f17971ca782dc10af3eb9bc (diff)
Add API stability annotations.
Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
Diffstat (limited to 'src/lib/utils/exceptn.h')
-rw-r--r--src/lib/utils/exceptn.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/lib/utils/exceptn.h b/src/lib/utils/exceptn.h
index 798f2240a..47f16e0b9 100644
--- a/src/lib/utils/exceptn.h
+++ b/src/lib/utils/exceptn.h
@@ -18,7 +18,7 @@ namespace Botan {
/**
* Base class for all exceptions thrown by the library
*/
-class BOTAN_DLL Exception : public std::exception
+class BOTAN_PUBLIC_API(2,0) Exception : public std::exception
{
public:
explicit Exception(const std::string& msg) : m_msg(msg) {}
@@ -31,7 +31,7 @@ class BOTAN_DLL Exception : public std::exception
/**
* An invalid argument
*/
-class BOTAN_DLL Invalid_Argument : public Exception
+class BOTAN_PUBLIC_API(2,0) Invalid_Argument : public Exception
{
public:
explicit Invalid_Argument(const std::string& msg) :
@@ -50,7 +50,7 @@ class BOTAN_DLL Invalid_Argument : public Exception
* An argument that is invalid because it is not supported by Botan.
* It might or might not be valid in another context like a standard.
*/
-struct BOTAN_DLL Unsupported_Argument : public Invalid_Argument
+struct BOTAN_PUBLIC_API(2,0) Unsupported_Argument : public Invalid_Argument
{
explicit Unsupported_Argument(const std::string& msg) : Invalid_Argument(msg) {}
};
@@ -58,7 +58,7 @@ struct BOTAN_DLL Unsupported_Argument : public Invalid_Argument
/**
* Invalid_State Exception
*/
-struct BOTAN_DLL Invalid_State : public Exception
+struct BOTAN_PUBLIC_API(2,0) Invalid_State : public Exception
{
explicit Invalid_State(const std::string& err) :
Exception(err)
@@ -68,7 +68,7 @@ struct BOTAN_DLL Invalid_State : public Exception
/**
* Lookup_Error Exception
*/
-struct BOTAN_DLL Lookup_Error : public Exception
+struct BOTAN_PUBLIC_API(2,0) Lookup_Error : public Exception
{
explicit Lookup_Error(const std::string& err) :
Exception(err)
@@ -85,7 +85,7 @@ struct BOTAN_DLL Lookup_Error : public Exception
/**
* Internal_Error Exception
*/
-struct BOTAN_DLL Internal_Error : public Exception
+struct BOTAN_PUBLIC_API(2,0) Internal_Error : public Exception
{
explicit Internal_Error(const std::string& err) :
Exception("Internal error: " + err)
@@ -95,7 +95,7 @@ struct BOTAN_DLL Internal_Error : public Exception
/**
* Invalid_Key_Length Exception
*/
-struct BOTAN_DLL Invalid_Key_Length : public Invalid_Argument
+struct BOTAN_PUBLIC_API(2,0) Invalid_Key_Length : public Invalid_Argument
{
Invalid_Key_Length(const std::string& name, size_t length) :
Invalid_Argument(name + " cannot accept a key of length " +
@@ -106,7 +106,7 @@ struct BOTAN_DLL Invalid_Key_Length : public Invalid_Argument
/**
* Invalid_IV_Length Exception
*/
-struct BOTAN_DLL Invalid_IV_Length : public Invalid_Argument
+struct BOTAN_PUBLIC_API(2,0) Invalid_IV_Length : public Invalid_Argument
{
Invalid_IV_Length(const std::string& mode, size_t bad_len) :
Invalid_Argument("IV length " + std::to_string(bad_len) +
@@ -117,7 +117,7 @@ struct BOTAN_DLL Invalid_IV_Length : public Invalid_Argument
/**
* PRNG_Unseeded Exception
*/
-struct BOTAN_DLL PRNG_Unseeded : public Invalid_State
+struct BOTAN_PUBLIC_API(2,0) PRNG_Unseeded : public Invalid_State
{
explicit PRNG_Unseeded(const std::string& algo) :
Invalid_State("PRNG not seeded: " + algo)
@@ -127,7 +127,7 @@ struct BOTAN_DLL PRNG_Unseeded : public Invalid_State
/**
* Policy_Violation Exception
*/
-struct BOTAN_DLL Policy_Violation : public Invalid_State
+struct BOTAN_PUBLIC_API(2,0) Policy_Violation : public Invalid_State
{
explicit Policy_Violation(const std::string& err) :
Invalid_State("Policy violation: " + err)
@@ -137,7 +137,7 @@ struct BOTAN_DLL Policy_Violation : public Invalid_State
/**
* Algorithm_Not_Found Exception
*/
-struct BOTAN_DLL Algorithm_Not_Found : public Lookup_Error
+struct BOTAN_PUBLIC_API(2,0) Algorithm_Not_Found : public Lookup_Error
{
explicit Algorithm_Not_Found(const std::string& name) :
Lookup_Error("Could not find any algorithm named \"" + name + "\"")
@@ -147,7 +147,7 @@ struct BOTAN_DLL Algorithm_Not_Found : public Lookup_Error
/**
* No_Provider_Found Exception
*/
-struct BOTAN_DLL No_Provider_Found : public Exception
+struct BOTAN_PUBLIC_API(2,0) No_Provider_Found : public Exception
{
explicit No_Provider_Found(const std::string& name) :
Exception("Could not find any provider for algorithm named \"" + name + "\"")
@@ -158,7 +158,7 @@ struct BOTAN_DLL No_Provider_Found : public Exception
* Provider_Not_Found is thrown when a specific provider was requested
* but that provider is not available.
*/
-struct BOTAN_DLL Provider_Not_Found : public Lookup_Error
+struct BOTAN_PUBLIC_API(2,0) Provider_Not_Found : public Lookup_Error
{
Provider_Not_Found(const std::string& algo, const std::string& provider) :
Lookup_Error("Could not find provider '" + provider + "' for " + algo) {}
@@ -167,7 +167,7 @@ struct BOTAN_DLL Provider_Not_Found : public Lookup_Error
/**
* Invalid_Algorithm_Name Exception
*/
-struct BOTAN_DLL Invalid_Algorithm_Name : public Invalid_Argument
+struct BOTAN_PUBLIC_API(2,0) Invalid_Algorithm_Name : public Invalid_Argument
{
explicit Invalid_Algorithm_Name(const std::string& name):
Invalid_Argument("Invalid algorithm name: " + name)
@@ -177,7 +177,7 @@ struct BOTAN_DLL Invalid_Algorithm_Name : public Invalid_Argument
/**
* Encoding_Error Exception
*/
-struct BOTAN_DLL Encoding_Error : public Invalid_Argument
+struct BOTAN_PUBLIC_API(2,0) Encoding_Error : public Invalid_Argument
{
explicit Encoding_Error(const std::string& name) :
Invalid_Argument("Encoding error: " + name) {}
@@ -186,7 +186,7 @@ struct BOTAN_DLL Encoding_Error : public Invalid_Argument
/**
* Decoding_Error Exception
*/
-struct BOTAN_DLL Decoding_Error : public Invalid_Argument
+struct BOTAN_PUBLIC_API(2,0) Decoding_Error : public Invalid_Argument
{
explicit Decoding_Error(const std::string& name) :
Invalid_Argument("Decoding error: " + name) {}
@@ -195,7 +195,7 @@ struct BOTAN_DLL Decoding_Error : public Invalid_Argument
/**
* Integrity_Failure Exception
*/
-struct BOTAN_DLL Integrity_Failure : public Exception
+struct BOTAN_PUBLIC_API(2,0) Integrity_Failure : public Exception
{
explicit Integrity_Failure(const std::string& msg) :
Exception("Integrity failure: " + msg) {}
@@ -204,7 +204,7 @@ struct BOTAN_DLL Integrity_Failure : public Exception
/**
* Invalid_OID Exception
*/
-struct BOTAN_DLL Invalid_OID : public Decoding_Error
+struct BOTAN_PUBLIC_API(2,0) Invalid_OID : public Decoding_Error
{
explicit Invalid_OID(const std::string& oid) :
Decoding_Error("Invalid ASN.1 OID: " + oid) {}
@@ -213,7 +213,7 @@ struct BOTAN_DLL Invalid_OID : public Decoding_Error
/**
* Stream_IO_Error Exception
*/
-struct BOTAN_DLL Stream_IO_Error : public Exception
+struct BOTAN_PUBLIC_API(2,0) Stream_IO_Error : public Exception
{
explicit Stream_IO_Error(const std::string& err) :
Exception("I/O error: " + err)
@@ -223,7 +223,7 @@ struct BOTAN_DLL Stream_IO_Error : public Exception
/**
* No_Filesystem_Access Exception
*/
-struct BOTAN_DLL No_Filesystem_Access : public Exception
+struct BOTAN_PUBLIC_API(2,0) No_Filesystem_Access : public Exception
{
No_Filesystem_Access() : Exception("No filesystem access enabled.") {}
};
@@ -231,7 +231,7 @@ struct BOTAN_DLL No_Filesystem_Access : public Exception
/**
* Self Test Failure Exception
*/
-struct BOTAN_DLL Self_Test_Failure : public Internal_Error
+struct BOTAN_PUBLIC_API(2,0) Self_Test_Failure : public Internal_Error
{
explicit Self_Test_Failure(const std::string& err) :
Internal_Error("Self test failed: " + err)
@@ -241,7 +241,7 @@ struct BOTAN_DLL Self_Test_Failure : public Internal_Error
/**
* Not Implemented Exception
*/
-struct BOTAN_DLL Not_Implemented : public Exception
+struct BOTAN_PUBLIC_API(2,0) Not_Implemented : public Exception
{
explicit Not_Implemented(const std::string& err) :
Exception("Not implemented", err)