-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Throw DirectoryNotFoundException on Image.Save with bad directory (#3…
…4998) * Provide better exception when saving to non-existent directory When saving an image to a non-existent directory, throw a DirectoryNotFoundException vs a System.Runtime.InteropServices.ExternalException. Fix #31367 * Change exception message to be more intuitive Use: The directory {0} of the filename {1} does not exist. instead of: The target directory {0} of the targetPath {1} does not exist. Fix #31367 * Fix test on unix by using built path. We were using a hardcoded path with backslashes. That didn't match the built path for the Assert. * Make Test conditional as it requires GDI+ * Put directory check closer to where it's used to ensure that we capture it from all Save variations. * Remove trailing whitespace * Update test to ensure it doesn't run on the .NET Framework * Change CheckIfDirectoryExists to ThrowIfDirectoryDoesntExist to match naming conventions for throw-style methods. Fix #31367 * Fixes typo in test name Fix #31367
- Loading branch information
1 parent
80d8920
commit 8981ad7
Showing
5 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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