19 #include <system_error>
28 const char* name()
const noexcept {
return "Windows"; }
30 std::string message(int32_t)
const;
43 std::system_error windows(DWORD code,
const char*
function);
45 template <
typename Ret>
46 std::runtime_error custom(Ret ret,
const char*
function) {
47 std::ostringstream oss;
48 oss <<
"Function " <<
function <<
" failed with error code " << ret;
49 return std::runtime_error{oss.str()};