forked from TeamInklings/Octobot
Log result failures with stack traces (#282)
This feature will improve the debugging experience for developers by providing the information about *where exactly* a result has failed --------- Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
5cc04e9cc3
commit
309d900067
21 changed files with 145 additions and 71 deletions
|
@ -53,7 +53,7 @@ public sealed class ScheduledEventUpdateService : BackgroundService
|
|||
var eventsResult = await _eventApi.ListScheduledEventsForGuildAsync(guildId, ct: ct);
|
||||
if (!eventsResult.IsDefined(out var events))
|
||||
{
|
||||
return Result.FromError(eventsResult);
|
||||
return ResultExtensions.FromError(eventsResult);
|
||||
}
|
||||
|
||||
SyncScheduledEvents(data, events);
|
||||
|
@ -204,7 +204,7 @@ public sealed class ScheduledEventUpdateService : BackgroundService
|
|||
|
||||
if (!embedDescriptionResult.IsDefined(out var embedDescription))
|
||||
{
|
||||
return Result.FromError(embedDescriptionResult);
|
||||
return ResultExtensions.FromError(embedDescriptionResult);
|
||||
}
|
||||
|
||||
var embed = new EmbedBuilder()
|
||||
|
@ -298,12 +298,12 @@ public sealed class ScheduledEventUpdateService : BackgroundService
|
|||
scheduledEvent, data, ct);
|
||||
if (!contentResult.IsDefined(out var content))
|
||||
{
|
||||
return Result.FromError(contentResult);
|
||||
return ResultExtensions.FromError(contentResult);
|
||||
}
|
||||
|
||||
if (!embedDescriptionResult.IsDefined(out var embedDescription))
|
||||
{
|
||||
return Result.FromError(embedDescriptionResult);
|
||||
return ResultExtensions.FromError(embedDescriptionResult);
|
||||
}
|
||||
|
||||
var startedEmbed = new EmbedBuilder()
|
||||
|
@ -416,7 +416,7 @@ public sealed class ScheduledEventUpdateService : BackgroundService
|
|||
scheduledEvent, data, ct);
|
||||
if (!contentResult.IsDefined(out var content))
|
||||
{
|
||||
return Result.FromError(contentResult);
|
||||
return ResultExtensions.FromError(contentResult);
|
||||
}
|
||||
|
||||
var earlyResult = new EmbedBuilder()
|
||||
|
|
Reference in a new issue