OXY API 1.0
OXY API Library Documentation
Loading...
Searching...
No Matches
win32_error.hpp File Reference

Provides utilities for handling Win32 error codes and converting them to std::error_code. More...

Classes

struct  oxy::detail::win32_error_category
 Custom error category for Win32 error codes, providing descriptive names and messages. More...
struct  oxy::win32_error_code
 A wrapper for Win32 error codes to facilitate conversion to std::error_code. More...
struct  std::is_error_code_enum< oxy::win32_error_code >
 Specialization of std::is_error_code_enum for oxy::win32_error_code. More...

Namespaces

namespace  oxy
 This root namespace contains the common types and operations for the OXY-API library.
namespace  std
 STL namespace.

Functions

std::error_code oxy::make_error_code (win32_error_code const &we)
 Creates a std::error_code from a win32_error_code object.
std::error_code oxy::make_win32_error_code ()
 Create an error_code from the last Windows error.
std::error_code oxy::make_win32_error_code (DWORD e)
 Create an error_code from a Windows error code.
std::error_code oxy::make_winsock_error_code ()
 Create an error_code from the last Winsock error.

Variables

const detail::win32_error_category oxy::win32_error_category {}
 A global instance of the Win32 error category for use with the error handling system.

Detailed Description

Provides utilities for handling Win32 error codes and converting them to std::error_code.

This header defines the win32_error_code struct, which wraps Win32 error codes and facilitates their conversion to std::error_code. It also defines a custom error category for Win32 error codes, providing descriptive names and messages. The utilities in this header enable seamless integration of Win32 error codes with the standard C++ error handling system.

@license MPL-2.0