diff options
author | Rob Mensching <rob@firegiant.com> | 2022-11-21 00:05:14 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2022-11-21 15:25:02 -0800 |
commit | 8a4c0810ea2756888df18b0da5813e8c5bad4c54 (patch) | |
tree | 8ad585d64e1bd4a3b3d5d96f238b6fc3a2470ad9 /src/api | |
parent | e6ef75f3616f1221a43e3b412b42f9ca6a2bef7e (diff) | |
download | wix-8a4c0810ea2756888df18b0da5813e8c5bad4c54.tar.gz wix-8a4c0810ea2756888df18b0da5813e8c5bad4c54.tar.bz2 wix-8a4c0810ea2756888df18b0da5813e8c5bad4c54.zip |
Improve file not found error message
Fixes 2805
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/wix/WixToolset.Data/ErrorMessages.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/api/wix/WixToolset.Data/ErrorMessages.cs b/src/api/wix/WixToolset.Data/ErrorMessages.cs index 0c7511b9..070abd69 100644 --- a/src/api/wix/WixToolset.Data/ErrorMessages.cs +++ b/src/api/wix/WixToolset.Data/ErrorMessages.cs | |||
@@ -640,19 +640,19 @@ namespace WixToolset.Data | |||
640 | 640 | ||
641 | public static Message FileNotFound(SourceLineNumber sourceLineNumbers, string file) | 641 | public static Message FileNotFound(SourceLineNumber sourceLineNumbers, string file) |
642 | { | 642 | { |
643 | return Message(sourceLineNumbers, Ids.FileNotFound, "The system cannot find the file '{0}'.", file); | 643 | return Message(sourceLineNumbers, Ids.FileNotFound, "Cannot find the file '{0}'.", file); |
644 | } | 644 | } |
645 | 645 | ||
646 | public static Message FileNotFound(SourceLineNumber sourceLineNumbers, string file, string fileType) | 646 | public static Message FileNotFound(SourceLineNumber sourceLineNumbers, string file, string fileType) |
647 | { | 647 | { |
648 | return Message(sourceLineNumbers, Ids.FileNotFound, "The system cannot find the file '{0}' with type '{1}'.", file, fileType); | 648 | return Message(sourceLineNumbers, Ids.FileNotFound, "Cannot find the {0} file '{1}'.", fileType, file); |
649 | } | 649 | } |
650 | 650 | ||
651 | public static Message FileNotFound(SourceLineNumber sourceLineNumbers, string file, string fileType, IEnumerable<string> checkedPaths) | 651 | public static Message FileNotFound(SourceLineNumber sourceLineNumbers, string file, string fileType, IEnumerable<string> checkedPaths) |
652 | { | 652 | { |
653 | var combinedCheckedPaths = String.Join(", ", checkedPaths); | 653 | var combinedCheckedPaths = String.Join(", ", checkedPaths); |
654 | var withType = String.IsNullOrEmpty(fileType) ? String.Empty : $" with type '{fileType}'"; | 654 | var fileTypePrefix = String.IsNullOrEmpty(fileType) ? String.Empty : fileType + " "; |
655 | return Message(sourceLineNumbers, Ids.FileNotFound, "The system cannot find the file '{0}'{1}. The following paths were checked: {2}", file, withType, combinedCheckedPaths); | 655 | return Message(sourceLineNumbers, Ids.FileNotFound, "Cannot find the {0}file '{1}'. The following paths were checked: {2}", fileTypePrefix, file, combinedCheckedPaths); |
656 | } | 656 | } |
657 | 657 | ||
658 | public static Message FileOrDirectoryPathRequired(string parameter) | 658 | public static Message FileOrDirectoryPathRequired(string parameter) |
@@ -662,12 +662,12 @@ namespace WixToolset.Data | |||
662 | 662 | ||
663 | public static Message FilePathRequired(string filePurpose) | 663 | public static Message FilePathRequired(string filePurpose) |
664 | { | 664 | { |
665 | return Message(null, Ids.FilePathRequired, "The path to {0} is required.", filePurpose); | 665 | return Message(null, Ids.FilePathRequired, "The path to the {0} is required.", filePurpose); |
666 | } | 666 | } |
667 | 667 | ||
668 | public static Message FilePathRequired(string parameter, string filePurpose) | 668 | public static Message FilePathRequired(string parameter, string filePurpose) |
669 | { | 669 | { |
670 | return Message(null, Ids.FilePathRequired, "The parameter '{0}' must be followed by a file path for {1}.", parameter, filePurpose); | 670 | return Message(null, Ids.FilePathRequired, "The parameter '{0}' must be followed by a file path for the {1}.", parameter, filePurpose); |
671 | } | 671 | } |
672 | 672 | ||
673 | public static Message FileTooLarge(SourceLineNumber sourceLineNumbers, string fileName) | 673 | public static Message FileTooLarge(SourceLineNumber sourceLineNumbers, string fileName) |