Cbeam
Loading...
Searching...
No Matches
cbeam/error/system_error.hpp
throw cbeam::error::system_error("Custom error message");
Custom exception class for handling system-level errors in a cross-platform manner.
Definition system_error.hpp:83

Under the hood:

Rationale: The differentiation between std::system_category() on Windows and std::generic_category() on Unix-based systems allows for more accurate representation of errors in a platform-specific manner. std::system_category() is used on Windows to align with the Windows-specific error codes provided by GetLastError(), while std::generic_category() is used on Unix-based systems for its broader applicability across various types of errors indicated by errno.