mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-24 11:36:51 +01:00
Don't choke on exceptions during error filtering. Pointless.
This commit is contained in:
parent
9442e2c36f
commit
4392eb9ea0
@ -228,20 +228,26 @@ public class ProtocolLibrary extends JavaPlugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Report filterReport(Object sender, Report report, boolean detailed) {
|
protected Report filterReport(Object sender, Report report, boolean detailed) {
|
||||||
String canonicalName = ReportType.getReportName(sender, report.getType());
|
try {
|
||||||
String reportName = Iterables.getLast(Splitter.on("#").split(canonicalName)).toUpperCase();
|
String canonicalName = ReportType.getReportName(sender, report.getType());
|
||||||
|
String reportName = Iterables.getLast(Splitter.on("#").split(canonicalName)).toUpperCase();
|
||||||
|
|
||||||
if (config != null && config.getModificationCount() != lastModCount) {
|
if (config != null && config.getModificationCount() != lastModCount) {
|
||||||
// Update our cached set again
|
// Update our cached set again
|
||||||
reports = Sets.newHashSet(config.getSuppressedReports());
|
reports = Sets.newHashSet(config.getSuppressedReports());
|
||||||
lastModCount = config.getModificationCount();
|
lastModCount = config.getModificationCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cancel reports either on the full canonical name, or just the report name
|
||||||
|
if (reports.contains(canonicalName) || reports.contains(reportName))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
// Only report this with a minor message
|
||||||
|
logger.warning("Error filtering reports: " + e.toString());
|
||||||
}
|
}
|
||||||
|
// Don't filter anything
|
||||||
// Cancel reports either on the full canonical name, or just the report name
|
return report;
|
||||||
if (reports.contains(canonicalName) || reports.contains(reportName))
|
|
||||||
return null;
|
|
||||||
else
|
|
||||||
return report;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user