mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-26 13:46:19 +00:00
moved some more exceptions to templates
made more specific exceptions for certain cases
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user