WEB-INF.rythm.e500.html Maven / Gradle / Ivy
@import org.rythmengine.exception.*
@import org.rythmengine.spring.web.*
@args Exception exception
@{
org.rythmengine.RythmEngine _rythm = __engine();
StackTraceElement head = RythmExceptionHandler.Util.head(exception);
List tail = RythmExceptionHandler.Util.tail(exception);
}
@if (exception instanceof RythmException) {
@{final RythmException rex = (RythmException)exception}
@rex.errorTitle()
@rex.errorDesc().raw()
@{
String tmpl = rex.getTemplateName();
int errLineNo = rex.templateLineNumber;
}
In @tmpl (around line @errLineNo)
@{
final List source = Arrays.asList(rex.templateSource.split("\n"));
final int from = errLineNo - 5 >= 0 && errLineNo < source.size() ? errLineNo - 5 : 0;
final int to = errLineNo + 5 < source.size() ? errLineNo + 5 : source.size()-1;
final List lines = new ArrayList();
for (int i = from; i <= to; ++i) {
lines.add(source.get(i));
}
}
@for (String line: lines) {
@//line_index + @from | @rex.templateLineNumber
@(line_index+from) @org.rythmengine.utils.S.escapeXml(line).toString().replace("↓", "↓").replace("\000", "").replace("\001", "").raw()
}
} else {
Internal Error
@exception.getClass().getName(): @exception.getMessage()
In @head.getFileName() (around line @head.getLineNumber(): @(head.getClassName()).@(head.isNativeMethod() ? "native method" : head.getMethodName()))
@for (StackTraceElement el: tail) {
@el_index@el
}
@// output causes
@{int causeId = 0}
@for(Throwable cause = exception.getCause();cause != null;cause = cause.getCause(), causeId++) {
@{
head = RythmExceptionHandler.Util.head(cause);
tail = RythmExceptionHandler.Util.tail(cause);
}
Casued by @cause.getMessage() in @head.getFileName() (around line @head.getLineNumber(): @(head.getClassName()).@(head.isNativeMethod() ? "native method" : head.getMethodName()))
@for (StackTraceElement el: tail) {
@el_index@el
}
}
The full stack trace of the root cause is available in the server logs...
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy