Prevent double exception printing when an error occurs whilst saving

a report
This commit is contained in:
Keir Nellyer 2016-09-30 01:05:50 +01:00
parent 26d6540b2f
commit 45eeac8cee
1 changed files with 50 additions and 46 deletions

View File

@ -265,6 +265,8 @@ public class ReportManager
CompletableFuture<Long> saveCompletableFuture = saveReport(report);
saveCompletableFuture.thenAccept(reportId ->
{
try
{
if (reportResult.getType() == ReportResultType.ABUSIVE)
{
@ -321,9 +323,11 @@ public class ReportManager
});
_reportRepository.clearCache(reportId);
}).exceptionally(throwable -> {
}
catch (Throwable throwable)
{
_plugin.getLogger().log(Level.SEVERE, "Post-report save failed.", throwable);
return null;
}
});
});
}