moved some more exceptions to templates

made more specific exceptions for certain cases
This commit is contained in:
Sheldan
2020-05-13 23:25:52 +02:00
parent cb1abaed7d
commit cf04687f04
17 changed files with 110 additions and 30 deletions

View File

@@ -50,7 +50,7 @@ public class BanServiceBean implements BanService {
guildByIdOptional.get().ban(userId.toString(), 0, reason).queue();
} else {
log.warn("Guild {} not found. Not able to ban user {}", guildId, userId);
throw new GuildException(String.format("Guild %s not found. Not able to ban user %s", guildId, userId));
throw new GuildException(guildId);
}
}
}

View File

@@ -37,7 +37,7 @@ public class KickServiceBean implements KickService {
this.sendKickLog(kickLogModel);
} else {
log.warn("Not able to kick. Guild {} not found.", kickLogModel.getGuild().getIdLong());
throw new GuildException(String.format("Not able to kick %s. Guild %s not found", kickLogModel.getMember().getIdLong(), kickLogModel.getGuild().getIdLong()));
throw new GuildException(kickLogModel.getGuild().getIdLong());
}
}