Skip to content

Commit 18716e4

Browse files
refactor: used existing common exception for file-in-use error in file stream opening
1 parent 2a70ae1 commit 18716e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TestableIO.System.IO.Abstractions.TestingHelpers/MockFileStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public MockFileStream(
6060

6161
if (_fileShareNoneStreams.ContainsKey(path))
6262
{
63-
throw new IOException($"The process cannot access the file '{path}' because it is being used by another process.");
63+
throw CommonExceptions.ProcessCannotAccessFileInUse(path);
6464
}
6565

6666
if (mockFileDataAccessor.FileExists(path))

0 commit comments

Comments
 (0)