Skip to content

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

Merged
jonsequitur merged 2 commits intodotnet:mainfrom
therealchjones:1688-filesysteminfo-empty-arg-error
Apr 19, 2022
Merged

Present error instead of throwing exception for empty argument to FileSystemInfo type#1704
jonsequitur merged 2 commits intodotnet:mainfrom
therealchjones:1688-filesysteminfo-empty-arg-error

Conversation

@therealchjones
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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