update windows + fixes

This commit is contained in:
Mars 2025-05-02 15:17:17 -04:00
parent c33ab763e6
commit 34e6bf52fd
10 changed files with 75 additions and 79 deletions

View file

@ -71,16 +71,16 @@ namespace util::error {
}
}
#ifdef _WIN32
explicit DraconisError(const winrt::hresult_error& e) : message(winrt::to_string(e.message())) {
explicit DracError(const winrt::hresult_error& e) : message(winrt::to_string(e.message())) {
switch (e.code()) {
case E_ACCESSDENIED: code = DraconisErrorCode::PermissionDenied; break;
case E_ACCESSDENIED: code = DracErrorCode::PermissionDenied; break;
case HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND):
case HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND):
case HRESULT_FROM_WIN32(ERROR_SERVICE_NOT_FOUND): code = DraconisErrorCode::NotFound; break;
case HRESULT_FROM_WIN32(ERROR_SERVICE_NOT_FOUND): code = DracErrorCode::NotFound; break;
case HRESULT_FROM_WIN32(ERROR_TIMEOUT):
case HRESULT_FROM_WIN32(ERROR_SEM_TIMEOUT): code = DraconisErrorCode::Timeout; break;
case HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED): code = DraconisErrorCode::NotSupported; break;
default: code = DraconisErrorCode::PlatformSpecific; break;
case HRESULT_FROM_WIN32(ERROR_SEM_TIMEOUT): code = DracErrorCode::Timeout; break;
case HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED): code = DracErrorCode::NotSupported; break;
default: code = DracErrorCode::PlatformSpecific; break;
}
}
#else