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
|
@ -48,7 +48,7 @@ public class GuildMemberJoinedResponder : IResponder<IGuildMemberAdd>
|
|||
var returnRolesResult = await TryReturnRolesAsync(cfg, memberData, gatewayEvent.GuildID, user.ID, ct);
|
||||
if (!returnRolesResult.IsSuccess)
|
||||
{
|
||||
return Result.FromError(returnRolesResult.Error);
|
||||
return ResultExtensions.FromError(returnRolesResult);
|
||||
}
|
||||
|
||||
if (GuildSettings.WelcomeMessagesChannel.Get(cfg).Empty()
|
||||
|
@ -65,7 +65,7 @@ public class GuildMemberJoinedResponder : IResponder<IGuildMemberAdd>
|
|||
var guildResult = await _guildApi.GetGuildAsync(gatewayEvent.GuildID, ct: ct);
|
||||
if (!guildResult.IsDefined(out var guild))
|
||||
{
|
||||
return Result.FromError(guildResult);
|
||||
return ResultExtensions.FromError(guildResult);
|
||||
}
|
||||
|
||||
var embed = new EmbedBuilder()
|
||||
|
|
Reference in a new issue