From d3d3649a68cb1fa589fdd987a6690dbd5d671f0d Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sun, 17 Sep 2017 15:35:20 -0700 Subject: Initial code commit --- .../Exceptions/WixFileNotFoundException.cs | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/WixToolset.Core/Exceptions/WixFileNotFoundException.cs (limited to 'src/WixToolset.Core/Exceptions/WixFileNotFoundException.cs') diff --git a/src/WixToolset.Core/Exceptions/WixFileNotFoundException.cs b/src/WixToolset.Core/Exceptions/WixFileNotFoundException.cs new file mode 100644 index 00000000..14169c4c --- /dev/null +++ b/src/WixToolset.Core/Exceptions/WixFileNotFoundException.cs @@ -0,0 +1,52 @@ +// 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. + /// + /// The file that could not be found. + public WixFileNotFoundException(string file) : this(null, file, null) + { + } + + /// + /// 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(WixErrors.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(WixErrors.FileNotFound(sourceLineNumbers, file, fileType)) + { + } + } +} -- cgit v1.2.3-55-g6feb