@args Exception exception
@if (exception instanceof play.exceptions.PlayException) {
@{
    play.exceptions.PlayException pe = (play.exceptions.PlayException)exception;
}@
@pe.getErrorTitle()
@pe.getErrorDescription().replace('<strong>', '').replace('</strong>', '')
 
@if (pe.isSourceAvailable() && null != pe.getLineNumber() && "DEV".equals(play.Play.mode.name())) {
----------
In @pe.getSourceFile() (around line @pe.getLineNumber())

@{
    int from = pe.getLineNumber() - 5 >= 0 && pe.getLineNumber() < pe.getSource().size() ? pe.getlineNumber() - 5 : 0
    int to = pe.getLineNumber() + 5  < pe.getSource().size() ? pe.getLineNumber() + 5 : pe.getSource().size()-1
    List<String> source = pe.getSource();
    List<String> lines = new ArrayList();
    for (int i = from; i < to; ++i) {
        lines.add(source.get(i));
    }
}@
@for (String line: lines) {
@((pe.getLineNumber() == line_index+from ? ">":" ").escape()) @(line_index+from): @line
}
}
 
This exception has been logged with id @pe.getId()
} else {
@exception.getMessage()
}
