提交 506fd8ea 编写于 作者: D David Heinemeier Hansson

Fixed error rendering of rxml documents to not just swallow the exception and...

Fixed error rendering of rxml documents to not just swallow the exception and return 0 (still not guessing the right line, but hey)

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@238 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 6ea54a63
*SVN*
* Fixed error rendering of rxml documents to not just swallow the exception and return 0 (still not guessing the right line, but hey)
* Fixed that textilize and markdown would instantiate their engines even on empty strings. This also fixes #333 [Ulysses]
* Added use of *_before_type_cast for all input and text fields. This is helpful for getting "100,000" back on a integer-based
......
......@@ -49,14 +49,13 @@ def sub_template_of(file_name)
end
def line_number
begin
@original_exception.backtrace.join.scan(/\((?:erb)\):([0-9]*)/).first.first.to_i
rescue
begin
original_exception.message.scan(/\((?:eval)\):([0-9]*)/).first.first.to_i
rescue
1
end
trace = @original_exception.backtrace.join
if trace.include?("erb):")
trace.scan(/\((?:erb)\):([0-9]*)/).first.first.to_i
elsif trace.include?("eval):")
trace.scan(/\((?:eval)\):([0-9]*)/).first.first.to_i
else
1
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册