Prevent double exception printing when an error occurs whilst saving
a report
This commit is contained in:
parent
26d6540b2f
commit
45eeac8cee
@ -265,6 +265,8 @@ public class ReportManager
|
|||||||
CompletableFuture<Long> saveCompletableFuture = saveReport(report);
|
CompletableFuture<Long> saveCompletableFuture = saveReport(report);
|
||||||
|
|
||||||
saveCompletableFuture.thenAccept(reportId ->
|
saveCompletableFuture.thenAccept(reportId ->
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (reportResult.getType() == ReportResultType.ABUSIVE)
|
if (reportResult.getType() == ReportResultType.ABUSIVE)
|
||||||
{
|
{
|
||||||
@ -321,9 +323,11 @@ public class ReportManager
|
|||||||
});
|
});
|
||||||
|
|
||||||
_reportRepository.clearCache(reportId);
|
_reportRepository.clearCache(reportId);
|
||||||
}).exceptionally(throwable -> {
|
}
|
||||||
|
catch (Throwable throwable)
|
||||||
|
{
|
||||||
_plugin.getLogger().log(Level.SEVERE, "Post-report save failed.", throwable);
|
_plugin.getLogger().log(Level.SEVERE, "Post-report save failed.", throwable);
|
||||||
return null;
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user