37 #ifndef VIRGIL_SYSTEM_CRYPTO_ERROR_H 38 #define VIRGIL_SYSTEM_CRYPTO_ERROR_H 40 #include <system_error> 42 #include "../VirgilCryptoError.h" 44 namespace virgil {
namespace crypto {
namespace foundation {
56 const char*
name()
const noexcept
override;
63 std::string
message(
int ev)
const noexcept
override;
85 if (result >= 0) {
return result; }
118 template<
typename CatchHandler>
120 if (result >= 0) {
return result; }
124 catch_handler(result);
142 template<
typename CatchHandler>
144 (void) system_crypto_handler_get_result<CatchHandler>(result, catch_handler);
149 #endif //VIRGIL_SYSTEM_CRYPTO_ERROR_H const char * name() const noexceptoverride
Return name of the system crypto category.
Error category that handles error codes from the system crypto library.
Definition: VirgilSystemCryptoError.h:50
Root namespace for all Virgil Security libraries.
Definition: VirgilAsn1Compatible.h:46
This only exception that crypto library can produce.
Definition: VirgilCryptoException.h:54
const VirgilSystemCryptoErrorCategory & system_crypto_category() noexcept
Return singleton instance of the system crypto error category.
int system_crypto_handler_get_result(int result)
Handle value returned by underling system crypto library.
Definition: VirgilSystemCryptoError.h:84
std::string message(int ev) const noexceptoverride
Return description for the given error code.
void system_crypto_handler(int result)
Handle value returned by underling system crypto library.
Definition: VirgilSystemCryptoError.h:99