Files
Discord.Net/src/Discord.Net.Interactions/InteractionException.cs
Cenk Ergen 0f0f3f7614 Log InteractionCommand execution exceptions in Wrapped Exception (#2584)
* log command execution exceptions in wrapped obj

* actually log the wrapped exception

---------

Co-authored-by: Misha133 <mihagribkov133@gmail.com>
2024-01-16 22:06:29 +00:00

18 lines
512 B
C#

using System;
namespace Discord.Interactions
{
public class InteractionException : Exception
{
public ICommandInfo CommandInfo { get; }
public IInteractionContext InteractionContext { get; }
public InteractionException(ICommandInfo commandInfo, IInteractionContext context, Exception exception)
: base($"Error occurred executing {commandInfo}.", exception)
{
CommandInfo = commandInfo;
InteractionContext = context;
}
}
}