aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Bind
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2017-12-19 12:24:16 -0800
committerRob Mensching <rob@firegiant.com>2017-12-19 12:24:16 -0800
commitf680e915f065026efd0301a76fd524f87b8c5f06 (patch)
tree63b6a8d7b799b10d77e133209041a809f4f3d144 /src/WixToolset.Data/Bind
parent77dc8cd1acd5332aa0cb077c7e87d0678756969b (diff)
downloadwix-f680e915f065026efd0301a76fd524f87b8c5f06.tar.gz
wix-f680e915f065026efd0301a76fd524f87b8c5f06.tar.bz2
wix-f680e915f065026efd0301a76fd524f87b8c5f06.zip
Simplify message handling
Diffstat (limited to 'src/WixToolset.Data/Bind')
-rw-r--r--src/WixToolset.Data/Bind/FileTransfer.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/WixToolset.Data/Bind/FileTransfer.cs b/src/WixToolset.Data/Bind/FileTransfer.cs
index 178934e8..088146d1 100644
--- a/src/WixToolset.Data/Bind/FileTransfer.cs
+++ b/src/WixToolset.Data/Bind/FileTransfer.cs
@@ -86,23 +86,23 @@ namespace WixToolset.Data.Bind
86 { 86 {
87 result = Path.GetFullPath(path); 87 result = Path.GetFullPath(path);
88 88
89 string filename = Path.GetFileName(result); 89 var filename = Path.GetFileName(result);
90 90
91 foreach (string reservedName in Common.ReservedFileNames) 91 foreach (var reservedName in Common.ReservedFileNames)
92 { 92 {
93 if (reservedName.Equals(filename, StringComparison.OrdinalIgnoreCase)) 93 if (reservedName.Equals(filename, StringComparison.OrdinalIgnoreCase))
94 { 94 {
95 throw new WixException(WixDataErrors.InvalidFileName(sourceLineNumbers, path)); 95 throw new WixException(ErrorMessages.InvalidFileName(sourceLineNumbers, path));
96 } 96 }
97 } 97 }
98 } 98 }
99 catch (System.ArgumentException) 99 catch (ArgumentException)
100 { 100 {
101 throw new WixException(WixDataErrors.InvalidFileName(sourceLineNumbers, path)); 101 throw new WixException(ErrorMessages.InvalidFileName(sourceLineNumbers, path));
102 } 102 }
103 catch (System.IO.PathTooLongException) 103 catch (PathTooLongException)
104 { 104 {
105 throw new WixException(WixDataErrors.PathTooLong(sourceLineNumbers, path)); 105 throw new WixException(ErrorMessages.PathTooLong(sourceLineNumbers, path));
106 } 106 }
107 107
108 return result; 108 return result;