-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathCommandLineParserException.cs
More file actions
29 lines (27 loc) · 1.33 KB
/
Copy pathCommandLineParserException.cs
File metadata and controls
29 lines (27 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
namespace BytecodeApi.CommandLineParser;
/// <summary>
/// The exception that is thrown when commandline parsing failed or was asserted using the <see cref="ParsedOptionSet.Assert" /> object.
/// </summary>
public sealed class CommandLineParserException : Exception
{
/// <summary>
/// Gets a <see cref="CommandLineParserError" /> value that indicates what validation took place using the <see cref="ParsedOptionSet.Assert" /> object. For general exceptions, <see cref="CommandLineParserError.None" /> is returned.
/// </summary>
public CommandLineParserError Error { get; }
/// <summary>
/// Initializes a new instance of the <see cref="CommandLineParserException" /> class.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public CommandLineParserException(string? message) : this(CommandLineParserError.None, message)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="CommandLineParserException" /> class.
/// </summary>
/// <param name="error">If validated using the <see cref="ParsedOptionSet.Assert" /> object, indicates what validation took place.</param>
/// <param name="message">The message that describes the error.</param>
public CommandLineParserException(CommandLineParserError error, string? message) : base(message)
{
Error = error;
}
}