* log command execution exceptions in wrapped obj * actually log the wrapped exception --------- Co-authored-by: Misha133 <mihagribkov133@gmail.com>
18 lines
512 B
C#
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;
|
|
}
|
|
}
|
|
}
|