Skip to content

Commit

Permalink
Fix error display in template when the error occurs on the last line
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumebort committed May 16, 2011
1 parent c5de253 commit 7fe98ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/templates/tags/500.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h1>
<div id="source" class="block">
<h2>In ${exception.sourceFile} (around line ${exception.lineNumber})</h2>
%{
from = exception.lineNumber - 5 >= 0 && exception.lineNumber < exception.source.size() ? exception.lineNumber - 5 : 0
from = exception.lineNumber - 5 >= 0 && exception.lineNumber <= exception.source.size() ? exception.lineNumber - 5 : 0
to = exception.lineNumber + 5 < exception.source.size() ? exception.lineNumber + 5 : exception.source.size()-1
}%
#{list items:exception.source[from..to], as:'line'}
Expand Down

0 comments on commit 7fe98ca

Please sign in to comment.