-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore IOException in PollingFileChangeToken #57376
Conversation
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsContributes to #57221, ignores the exception to unblock clean CI.
|
src/libraries/System.Private.CoreLib/src/System/IO/FileStatus.Unix.cs
Outdated
Show resolved
Hide resolved
this is fine (with fix I noted above) but I wonder whether it would be helpful (in another PR) to log the path for more exception types in GetExceptionForIoErrno. Right now although you pass the path it drops the path for several error codes, including the EINVAL in this case
You could potentially improve that to include the path. It would mean adding a new string -- look for ArgumentOutOfRange_FileLengthTooBig to find the 11 resx files that would need it. The string would look like internal static Exception GetIOException(Interop.ErrorInfo errorInfo)
{
return path != null ?
new IOException(SR.Format(SR.IO_YourNewString, path, errorInfo.GetErrorMessage()), errorInfo.RawErrno) :
new IOException(errorInfo.GetErrorMessage(), errorInfo.RawErrno);
} I think that would be a reasonable product change that would also potentially help with this bug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm with the note
The tests are failing because somewhere we passed -1 to the constructor of ErrorInfo. |
Addressed in 6d09715. |
Hello @jozkee! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Contributes to #57221, ignores the exception to unblock clean CI.
I've also split
throw
calls to one perstat
/lstat
to identify which is the one throwing EINVAL.