8#ifndef BOTAN_EXCEPTION_H_
9#define BOTAN_EXCEPTION_H_
11#include <botan/types.h>
93 const char*
what() const noexcept
override {
return m_msg.c_str(); }
112 explicit Exception(std::string_view msg);
117 Exception(
const char* prefix, std::string_view msg);
122 Exception(std::string_view msg,
const std::exception& e);
239 Lookup_Error(std::string_view type, std::string_view algo, std::string_view provider =
"");
312 int error_code() const noexcept
override {
return m_error_code; }
341template <
typename E,
typename... Args>
342inline void do_throw_error(
const char* file,
int line,
const char* func, Args... args) {
343 throw E(file, line, func, args...);
#define BOTAN_PUBLIC_API(maj, min)
Algorithm_Not_Found(std::string_view name)
ErrorType error_type() const noexcept override
Decoding_Error(std::string_view name)
Encoding_Error(std::string_view name)
ErrorType error_type() const noexcept override
const char * what() const noexcept override
virtual ErrorType error_type() const noexcept
virtual int error_code() const noexcept
Exception(std::string_view msg)
ErrorType error_type() const noexcept override
Internal_Error(std::string_view err)
Invalid_Algorithm_Name(std::string_view name)
Invalid_Argument(std::string_view msg)
ErrorType error_type() const noexcept override
Invalid_Authentication_Tag(std::string_view msg)
ErrorType error_type() const noexcept override
ErrorType error_type() const noexcept override
Invalid_IV_Length(std::string_view mode, size_t bad_len)
Invalid_Key_Length(std::string_view name, size_t length)
ErrorType error_type() const noexcept override
ErrorType error_type() const noexcept override
Invalid_State(std::string_view err)
Key_Not_Set(std::string_view algo)
ErrorType error_type() const noexcept override
Lookup_Error(std::string_view err)
ErrorType error_type() const noexcept override
Not_Implemented(std::string_view err)
ErrorType error_type() const noexcept override
PRNG_Unseeded(std::string_view algo)
Provider_Not_Found(std::string_view algo, std::string_view provider)
Stream_IO_Error(std::string_view err)
ErrorType error_type() const noexcept override
System_Error(std::string_view msg)
ErrorType error_type() const noexcept override
int error_code() const noexcept override
Unknown_PK_Field_Name(std::string_view algo_name, std::string_view field_name)
void do_throw_error(const char *file, int line, const char *func, Args... args)
Invalid_Authentication_Tag Integrity_Failure
std::string to_string(ErrorType type)
Convert an ErrorType to string.