-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCommandMappingException.cs
More file actions
29 lines (26 loc) · 965 Bytes
/
CommandMappingException.cs
File metadata and controls
29 lines (26 loc) · 965 Bytes
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
using System;
using Ultz.Extensions.Commands.Built;
namespace Ultz.Extensions.Commands.Mapping
{
/// <summary>
/// Represents errors that occur during mapping <see cref="Built.Command" />s.
/// </summary>
public sealed class CommandMappingException : Exception
{
internal CommandMappingException(Command command, string segment, string message) : base(message)
{
Command = command;
Segment = segment;
}
/// <summary>
/// Gets the <see cref="Built.Command" /> this exception occurred for.
/// </summary>
public Command Command { get; }
/// <summary>
/// Gets the segment to the map this exception occurred at.
/// <see langword="null" /> if there were no segments (an attempt was made to map an ungrouped <see cref="Built.Command" />
/// without any aliases)
/// </summary>
public string Segment { get; }
}
}