css2sass properly reports line number on errors.

git-svn-id: svn://hamptoncatlin.com/haml/trunk@480 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
nex3 2007-04-01 22:39:44 +00:00
parent 55609a85b8
commit cf372948c1
1 changed files with 8 additions and 1 deletions

View File

@ -63,7 +63,14 @@ module Sass
# Processes the document and returns the result as a string
# containing the CSS template.
def render
build_tree.to_sass
begin
build_tree.to_sass
rescue Exception => err
line = @template.string[0...@template.pos].split("\n").size
err.backtrace.unshift "(css):#{line}"
raise err
end
end
private