Repository navigation
fix: route the remaining simulated system errors through the exception factory - #1147
Merged
Merged
Conversation
…n factory Some simulated system errors were built inline and their messages differed from the real system, which tests that only pinned the exception type, parameter name or HResult did not notice. They now go through `ExceptionFactory` and the tests pin the messages against the real system. - Invalid timer `dueTime` and `period` use the real message for the target framework (`ThrowIfLessThan` style on .NET 8+, with the trailing period before). - `Timer.Change` on a disposed timer (before .NET 8) no longer adds an object name, an invalid `SearchOption` reports "Enum value was out of legal range." and the `EnumerationOptions` polyfill reports "Non-negative number required.". - A search pattern with more `../` than parent directories throws "Access to the path '...' is denied." for the root instead of an invented message. - The closed file stream and the read-only directory delete errors keep their behaviour and only move into the factory.
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
Test Results 62 files 62 suites 1h 15m 46s ⏱️ Results for commit 16d4129. |
|
This is addressed in release v7.1.2. |
This was referenced Oct 29, 2026
This was referenced Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Some simulated system errors were built inline and their messages differed from the real system, which tests that only pinned the exception type, parameter name or HResult did not notice. They now go through
ExceptionFactoryand the tests pin the messages against the real system.dueTimeandperioduse the real message for the target framework (ThrowIfLessThanstyle on .NET 8+, with the trailing period before).Timer.Changeon a disposed timer (before .NET 8) no longer adds an object name, an invalidSearchOptionreports "Enum value was out of legal range." and theEnumerationOptionspolyfill reports "Non-negative number required.".../than parent directories throws "Access to the path '...' is denied." for the root instead of an invented message.