NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
ssl_exception.hpp
1#ifndef NEFORCE_NETWORK_SSL_SSL_EXCEPTION_HPP__
2#define NEFORCE_NETWORK_SSL_SSL_EXCEPTION_HPP__
4NEFORCE_BEGIN_NAMESPACE__
5
10
15struct NEFORCE_API ssl_exception final : thirdparty_exception {
16 static int last_error() noexcept;
17 static string last_error_message();
18
19 explicit ssl_exception(const char* info = "SSL Operation Failed.", const char* type = static_type,
20 const int code = last_error()) noexcept :
21 thirdparty_exception(info, type, code) {}
22
23 explicit ssl_exception(const int code) :
24 thirdparty_exception(last_error_message().data(), static_type, code) {}
25
26 explicit ssl_exception(const exception& e) :
27 thirdparty_exception(e) {}
28
29 ~ssl_exception() override = default;
30
31 static constexpr auto static_type = "ssl_exception";
32};
33 // Exceptions
35
36NEFORCE_END_NAMESPACE__
37#endif // NEFORCE_NETWORK_SSL_SSL_EXCEPTION_HPP__
NEFORCE_NODISCARD NEFORCE_ALWAYS_INLINE constexpr decltype(auto) data(Container &cont) noexcept(noexcept(cont.data()))
获取容器的底层数据指针
字符串类型别名和实用函数
exception(const char *info=static_type, const char *type=static_type, const int code=0)
构造函数
NEFORCE_NODISCARD int code() const noexcept
获取异常码
NEFORCE_NODISCARD const char * type() const noexcept
获取异常类型