mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-17 05:31:38 +01:00
Better internal error response
This commit is contained in:
parent
b02998442a
commit
c3b3985ef4
@ -16,17 +16,19 @@ public class InternalErrorResponse extends ErrorResponse {
|
||||
StringBuilder paragraph = new StringBuilder();
|
||||
paragraph.append("Please report this issue here: ");
|
||||
paragraph.append(Html.LINK.parse("https://github.com/Rsl1122/Plan-PlayerAnalytics/issues", "Issues"));
|
||||
paragraph.append("<br><br>");
|
||||
paragraph.append("<br><br><pre>");
|
||||
paragraph.append(e).append(" | ").append(cause);
|
||||
|
||||
for (StackTraceElement element : e.getStackTrace()) {
|
||||
paragraph.append("<br>");
|
||||
paragraph.append(" ").append(element);
|
||||
paragraph.append(" ").append(element);
|
||||
}
|
||||
if (e.getCause() != null) {
|
||||
appendCause(e.getCause(), paragraph);
|
||||
}
|
||||
|
||||
paragraph.append("</pre>");
|
||||
|
||||
super.setParagraph(paragraph.toString());
|
||||
super.replacePlaceholders();
|
||||
}
|
||||
@ -35,7 +37,7 @@ public class InternalErrorResponse extends ErrorResponse {
|
||||
paragraph.append("<br>Caused by: ").append(cause);
|
||||
for (StackTraceElement element : cause.getStackTrace()) {
|
||||
paragraph.append("<br>");
|
||||
paragraph.append(" ").append(element);
|
||||
paragraph.append(" ").append(element);
|
||||
}
|
||||
if (cause.getCause() != null) {
|
||||
appendCause(cause.getCause(), paragraph);
|
||||
|
@ -28,7 +28,7 @@ public enum Html {
|
||||
COLOR_E("<span class=\"yellow\">"),
|
||||
COLOR_F("<span class=\"white\">"),
|
||||
//
|
||||
FONT_AWESOME_ICON("<i class=\"fa fa-${0}\" aria-hidden=\"true\"></i>"),
|
||||
FONT_AWESOME_ICON("<i class=\"fa fa-${0}\"></i>"),
|
||||
SPAN("${0}</span>"),
|
||||
BUTTON("<a class=\"button\" href=\"${0}\">${1}</a>"),
|
||||
BUTTON_CLASS("class=\"button\""),
|
||||
|
Loading…
Reference in New Issue
Block a user