Error reporting. When an error occurs during compilation,
write out a css file with the error report and debugging information. Also, record the error to the output, but keep compiling the other stylesheets.
This commit is contained in:
parent
e359db1a77
commit
cc31c29807
@ -48,7 +48,15 @@ module Compass
|
||||
directory dir
|
||||
end
|
||||
sass_files.zip(css_files).each do |sass_filename, css_filename|
|
||||
compile sass_filename, css_filename, options
|
||||
begin
|
||||
compile sass_filename, css_filename, options
|
||||
rescue Sass::SyntaxError => e
|
||||
full_exception = Compass.configuration.environment == :development
|
||||
logger.record :error, basename(sass_filename)
|
||||
write_file(css_filename,
|
||||
Sass::SyntaxError.exception_to_css(e, :full_exception => full_exception),
|
||||
options.merge(:force => true))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user