From f680e915f065026efd0301a76fd524f87b8c5f06 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 19 Dec 2017 12:24:16 -0800 Subject: Simplify message handling --- src/WixToolset.Data/Bind/FileTransfer.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/WixToolset.Data/Bind/FileTransfer.cs') 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 { result = Path.GetFullPath(path); - string filename = Path.GetFileName(result); + var filename = Path.GetFileName(result); - foreach (string reservedName in Common.ReservedFileNames) + foreach (var reservedName in Common.ReservedFileNames) { if (reservedName.Equals(filename, StringComparison.OrdinalIgnoreCase)) { - throw new WixException(WixDataErrors.InvalidFileName(sourceLineNumbers, path)); + throw new WixException(ErrorMessages.InvalidFileName(sourceLineNumbers, path)); } } } - catch (System.ArgumentException) + catch (ArgumentException) { - throw new WixException(WixDataErrors.InvalidFileName(sourceLineNumbers, path)); + throw new WixException(ErrorMessages.InvalidFileName(sourceLineNumbers, path)); } - catch (System.IO.PathTooLongException) + catch (PathTooLongException) { - throw new WixException(WixDataErrors.PathTooLong(sourceLineNumbers, path)); + throw new WixException(ErrorMessages.PathTooLong(sourceLineNumbers, path)); } return result; -- cgit v1.2.3-55-g6feb