Skip to content

OnException handler

Arius Bronte edited this page Feb 23, 2020 · 1 revision

Basic usage

commands.OnException((e, token) =>
{
    Console.WriteLine("Wake up, everything is broken");
    Console.WriteLine($"[{DateTime.UtcNow}] {e.Message} {Environment.NewLine} {e.StackTrace}");
    return Task.CompletedTask;
});
Clone this wiki locally