@**
* Default page for 500 Internal Server Error responses, in development mode.
* This page display the error in the source code context.
*@
@(playEditor: Option[String], error: play.api.UsefulException)(implicit request: play.api.mvc.RequestHeader)
@error match {
case description:play.api.PlayException.RichDescription => {
@play.twirl.api.Html(description.htmlDescription)
}
case _ => {
@error.description
}
}
@error match {
case source:play.api.PlayException.ExceptionSource => {
@Option(source.sourceName).map { name =>
In @Option(source.line).fold {
@name (line number not found)
}{line =>
@playEditor.fold {
@name:@line
} { link =>
@name:@line
}
}
@Option(source.interestingLines(4)).map {
case interesting => {
@interesting.focus.zipWithIndex.map {
case (line,index) if index == interesting.errorLine => {
data-column="@c" }>@(interesting.firstLine+index)@(Option(source.position).map(pos => (line+" ").zipWithIndex.map{ case (c,i) if i == pos => Html("""""" + c + """"""); case (c,_) => c}).getOrElse(line))
}
case (line, index) => {
@(interesting.firstLine+index)@line
}
}
}
}
}
}
case attachment:play.api.PlayException.ExceptionAttachment => {
@attachment.subTitle
@attachment.content.split("\n").zipWithIndex.map {
case (line,index) => {
@(index+1)@line
}
}
}
case exception: play.api.PlayException if exception.cause != null => {
No source available, here is the exception stack trace: