Skip to content

Present error instead of throwing exception for empty argument to FileSystemInfo type #1704

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

Merged
merged 2 commits into from
Apr 19, 2022
Merged

Present error instead of throwing exception for empty argument to FileSystemInfo type #1704

merged 2 commits into from
Apr 19, 2022

Conversation

therealchjones
Copy link
Contributor

See also #1688. Included argument type conversions to FileSystemInfo, FileInfo, and DirectoryInfo do not use TryParse like other types; being passed an empty "path" argument results in exception:
Screen Shot 2022-04-09 at 17 28 45

This PR replaces this with a conversion error:
Screen Shot 2022-04-09 at 17 29 59

@dnfadmin
Copy link

dnfadmin commented Apr 9, 2022

CLA assistant check
All CLA requirements met.

therealchjones added a commit to therealchjones/mffer that referenced this pull request Apr 13, 2022
@jonsequitur
Copy link
Contributor

Thanks, @therealchjones!

@jonsequitur jonsequitur merged commit 3fef055 into dotnet:main Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants