Fixed DebugPageResponse ArrayIndexOutOfBounds resulting in 500 error code

This commit is contained in:
Rsl1122 2017-11-23 10:28:06 +02:00
parent 6d13727bc5
commit 9b5cdcc9a1

View File

@ -130,8 +130,12 @@ public class DebugPageResponse extends ErrorResponse {
private void appendBenchmarks(StringBuilder content) {
content.append("<pre>### Benchmarks<br>&#96;&#96;&#96;<br>");
for (String line : Benchmark.getAverages().asStringArray()) {
content.append(line).append("<br>");
try {
for (String line : Benchmark.getAverages().asStringArray()) {
content.append(line).append("<br>");
}
} catch (ArrayIndexOutOfBoundsException e) {
content.append("ArrayIndexOutOfBoundsException on Benchmark.getAverages().asStringArray()");
}
content.append("&#96;&#96;&#96;</pre>");
}