diff options
Diffstat (limited to 'src/WixToolset.Core/Exceptions/WixFileNotFoundException.cs')
-rw-r--r-- | src/WixToolset.Core/Exceptions/WixFileNotFoundException.cs | 52 |
1 files changed, 52 insertions, 0 deletions
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 @@ | |||
1 | // 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. | ||
2 | |||
3 | namespace WixToolset | ||
4 | { | ||
5 | using System; | ||
6 | using WixToolset.Data; | ||
7 | |||
8 | /// <summary> | ||
9 | /// WixException thrown when a file cannot be found. | ||
10 | /// </summary> | ||
11 | [Serializable] | ||
12 | public sealed class WixFileNotFoundException : WixException | ||
13 | { | ||
14 | /// <summary> | ||
15 | /// Instantiate a new WixFileNotFoundException. | ||
16 | /// </summary> | ||
17 | /// <param name="file">The file that could not be found.</param> | ||
18 | public WixFileNotFoundException(string file) : this(null, file, null) | ||
19 | { | ||
20 | } | ||
21 | |||
22 | /// <summary> | ||
23 | /// Instantiate a new WixFileNotFoundException. | ||
24 | /// </summary> | ||
25 | /// <param name="sourceLineNumbers">Source line information pertaining to the file that cannot be found.</param> | ||
26 | /// <param name="file">The file that could not be found.</param> | ||
27 | public WixFileNotFoundException(SourceLineNumber sourceLineNumbers, string file) : | ||
28 | base(WixErrors.FileNotFound(sourceLineNumbers, file)) | ||
29 | { | ||
30 | } | ||
31 | |||
32 | /// <summary> | ||
33 | /// Instantiate a new WixFileNotFoundException. | ||
34 | /// </summary> | ||
35 | /// <param name="file">The file that could not be found.</param> | ||
36 | /// <param name="fileType">The type of file that cannot be found.</param> | ||
37 | public WixFileNotFoundException(string file, string fileType) : this(null, file, fileType) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | /// <summary> | ||
42 | /// Instantiate a new WixFileNotFoundException. | ||
43 | /// </summary> | ||
44 | /// <param name="sourceLineNumbers">Source line information pertaining to the file that cannot be found.</param> | ||
45 | /// <param name="file">The file that could not be found.</param> | ||
46 | /// <param name="fileType">The type of file that cannot be found.</param> | ||
47 | public WixFileNotFoundException(SourceLineNumber sourceLineNumbers, string file, string fileType) : | ||
48 | base(WixErrors.FileNotFound(sourceLineNumbers, file, fileType)) | ||
49 | { | ||
50 | } | ||
51 | } | ||
52 | } | ||