mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-30 12:02:02 +01:00
Add few more Error cases
This commit is contained in:
parent
00d91ea140
commit
f7f0a3f141
@ -208,7 +208,7 @@ public class Analysis {
|
||||
if (analysisTypes.contains(boolTot)) {
|
||||
replaceMap.put(source.getPlaceholder(boolTot.getPlaceholderModifier()), AnalysisUtils.getBooleanTotal(boolTot, source, uuids));
|
||||
}
|
||||
} catch (NoClassDefFoundError | Exception e) {
|
||||
} catch (Exception | NoClassDefFoundError | NoSuchFieldError e) {
|
||||
Log.error("A PluginData-source caused an exception: " + source.getPlaceholder("").replace("%", ""));
|
||||
|
||||
Log.toLog(this.getClass().getName(), e);
|
||||
|
@ -105,7 +105,7 @@ public class AnalysisUtils {
|
||||
return source.parseContainer("", "Wrong Analysistype specified: " + analysisType.name());
|
||||
}
|
||||
return source.parseContainer(analysisType.getModifier(), String.valueOf(total));
|
||||
} catch (Exception | NoClassDefFoundError e) {
|
||||
} catch (Exception | NoClassDefFoundError | NoSuchFieldError e) {
|
||||
return logPluginDataCausedError(source, e);
|
||||
}
|
||||
}
|
||||
@ -150,7 +150,7 @@ public class AnalysisUtils {
|
||||
return source.parseContainer("Err ", "Wrong Analysistype specified: " + analysisType.name());
|
||||
}
|
||||
return source.parseContainer(analysisType.getModifier(), FormatUtils.cutDecimals(average));
|
||||
} catch (Exception e) {
|
||||
} catch (Exception | NoClassDefFoundError | NoSuchFieldError e) {
|
||||
return logPluginDataCausedError(source, e);
|
||||
}
|
||||
}
|
||||
@ -169,7 +169,7 @@ public class AnalysisUtils {
|
||||
.collect(Collectors.toList());
|
||||
long count = tempList.stream().filter(value -> value).count();
|
||||
return source.parseContainer(analysisType.getModifier(), ((double) (count / tempList.size()) * 100) + "%");
|
||||
} catch (Exception e) {
|
||||
} catch (Exception | NoClassDefFoundError | NoSuchFieldError e) {
|
||||
return logPluginDataCausedError(source, e);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user