1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

[Sass] Make sure Sass errors during #cssize are properly bubbled up.

This commit is contained in:
Nathan Weizenbaum 2009-11-26 00:03:56 -08:00
parent 72d69d2364
commit 710d461c48
4 changed files with 15 additions and 2 deletions

View file

@ -14,6 +14,15 @@ module Sass
protected
# @see \{Node#_cssize}
def _cssize(*args)
super
rescue Sass::SyntaxError => e
e.modify_backtrace(:filename => children.first.filename)
e.add_backtrace(:filename => @filename, :line => @line)
raise e
end
# Computes the CSS for the imported file.
#
# @param args [Array] Ignored

View file

@ -189,7 +189,7 @@ SASS
end
def test_imported_exception
[1, 2, 3].each do |i|
[1, 2, 3, 4].each do |i|
begin
Sass::Engine.new("@import bork#{i}", :load_paths => [File.dirname(__FILE__) + '/templates/']).render
rescue Sass::SyntaxError => err
@ -211,7 +211,7 @@ SASS
end
def test_double_imported_exception
[1, 2, 3].each do |i|
[1, 2, 3, 4].each do |i|
begin
Sass::Engine.new("@import nested_bork#{i}", :load_paths => [File.dirname(__FILE__) + '/templates/']).render
rescue Sass::SyntaxError => err

View file

@ -0,0 +1,2 @@
bork: blah

View file

@ -0,0 +1,2 @@
@import bork4