From 155a6e96346e0cb3d9ab6f5372fa29b46ebaee89 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 19 Dec 2017 12:25:40 -0800 Subject: Integrate simplified message handling --- src/WixToolset.Core/WixFileNotFoundException.cs | 44 +++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/WixToolset.Core/WixFileNotFoundException.cs (limited to 'src/WixToolset.Core/WixFileNotFoundException.cs') diff --git a/src/WixToolset.Core/WixFileNotFoundException.cs b/src/WixToolset.Core/WixFileNotFoundException.cs new file mode 100644 index 00000000..7bffe417 --- /dev/null +++ b/src/WixToolset.Core/WixFileNotFoundException.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset +{ + using System; + using WixToolset.Data; + + /// + /// WixException thrown when a file cannot be found. + /// + [Serializable] + public sealed class WixFileNotFoundException : WixException + { + /// + /// Instantiate a new WixFileNotFoundException. + /// + /// Source line information pertaining to the file that cannot be found. + /// The file that could not be found. + public WixFileNotFoundException(SourceLineNumber sourceLineNumbers, string file) : + base(ErrorMessages.FileNotFound(sourceLineNumbers, file)) + { + } + + /// + /// Instantiate a new WixFileNotFoundException. + /// + /// The file that could not be found. + /// The type of file that cannot be found. + public WixFileNotFoundException(string file, string fileType) : this(null, file, fileType) + { + } + + /// + /// Instantiate a new WixFileNotFoundException. + /// + /// Source line information pertaining to the file that cannot be found. + /// The file that could not be found. + /// The type of file that cannot be found. + public WixFileNotFoundException(SourceLineNumber sourceLineNumbers, string file, string fileType) : + base(ErrorMessages.FileNotFound(sourceLineNumbers, file, fileType)) + { + } + } +} -- cgit v1.2.3-55-g6feb