aboutsummaryrefslogtreecommitdiff
path: root/zenserver
diff options
context:
space:
mode:
Diffstat (limited to 'zenserver')
-rw-r--r--zenserver/experimental/usnjournal.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/zenserver/experimental/usnjournal.cpp b/zenserver/experimental/usnjournal.cpp
index f44e50945..a266c2338 100644
--- a/zenserver/experimental/usnjournal.cpp
+++ b/zenserver/experimental/usnjournal.cpp
@@ -164,7 +164,10 @@ UsnJournalReader::Initialize(std::filesystem::path VolumePath)
HRESULT hRes =
VolumeRootDir.Create(VolumePathName, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS);
- ThrowIfFailed(hRes, "Failed to open handle to volume root");
+ if (FAILED(hRes))
+ {
+ ThrowSystemException(hRes, "Failed to open handle to volume root");
+ }
FILE_ID_INFO FileInformation{};
BOOL Success = GetFileInformationByHandleEx(VolumeRootDir, FileIdInfo, &FileInformation, sizeof FileInformation);