Skip to content

Commit a056ce3

Browse files
committed
refactor: use errFailedMessage for FileName failures
1 parent beeb6b9 commit a056ce3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

deadlock-dotnet-sdk/Domain/SafeFileHandleEx.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ public unsafe (string? v, Exception? ex) FileFullPath
319319
if (fileName is (null, null))
320320
{
321321
const string errUnableMsg = "Unable to query " + nameof(FileName) + "; ";
322+
const string errFailedMsg = "Failed to query " + nameof(FileName) + "; ";
322323
if (FileFullPath.v is not null)
323324
{
324325
getFileOrDirectoryName(FileFullPath.v);
@@ -345,7 +346,7 @@ void getFileOrDirectoryName(string path)
345346
if (tmp.Length is 0)
346347
{
347348
fileName = (tmp = Path.GetDirectoryName(path)) is null
348-
? (null, new InvalidOperationException(errUnableMsg + $"'{path}' could not be processed for a file or directory name."))
349+
? (null, new InvalidOperationException(errFailedMsg + $"'{path}' could not be processed for a file or directory name."))
349350
: (tmp, null);
350351
}
351352
else

0 commit comments

Comments
 (0)