Output errors caused by inserting snapshots into database
This commit is contained in:
parent
7b184eab03
commit
e6989cd8da
@ -10,6 +10,7 @@ import java.util.Optional;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
import java.util.function.Function;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
@ -154,7 +155,11 @@ public class ReportManager
|
|||||||
if (report.getCategory() == ReportCategory.CHAT_ABUSE)
|
if (report.getCategory() == ReportCategory.CHAT_ABUSE)
|
||||||
{
|
{
|
||||||
Set<Snapshot> relatedSnapshots = _snapshotManager.getSnapshots(report.getSuspectId());
|
Set<Snapshot> relatedSnapshots = _snapshotManager.getSnapshots(report.getSuspectId());
|
||||||
_snapshotManager.getSnapshotRepository().insertSnapshots(reportId, relatedSnapshots);
|
_snapshotManager.getSnapshotRepository().insertSnapshots(reportId, relatedSnapshots)
|
||||||
|
.exceptionally(throwable -> {
|
||||||
|
_javaPlugin.getLogger().log(Level.SEVERE, "Error whilst inserting snapshots into database.", throwable);
|
||||||
|
return null;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
_reportRepository.updateReport(report);
|
_reportRepository.updateReport(report);
|
||||||
@ -201,7 +206,6 @@ public class ReportManager
|
|||||||
|
|
||||||
report.addReportReason(new ReportMessage(reporterId, reason, _serverName, _serverWeight));
|
report.addReportReason(new ReportMessage(reporterId, reason, _serverName, _serverWeight));
|
||||||
|
|
||||||
// todo store token for chat site
|
|
||||||
_reportRepository.updateReport(report)
|
_reportRepository.updateReport(report)
|
||||||
.exceptionally(throwable -> {
|
.exceptionally(throwable -> {
|
||||||
_javaPlugin.getLogger().log(Level.SEVERE, "Error updating report to database.", throwable);
|
_javaPlugin.getLogger().log(Level.SEVERE, "Error updating report to database.", throwable);
|
||||||
|
Loading…
Reference in New Issue
Block a user