Added Sprockets logger and now log asset pipeline compilation exceptions

This commit is contained in:
Marcus Mateus 2012-06-18 01:26:46 -05:00
parent 5ff1a9d255
commit b65a3edaa2

View File

@ -154,6 +154,9 @@ module Jasmine::Headless
end end
end end
@sprockets_environment.logger = Logger.new(STDOUT)
@sprockets_environment.logger.level = Logger::WARN
@sprockets_environment @sprockets_environment
end end
@ -291,7 +294,12 @@ module Jasmine::Headless
end end
def add_path(path, type = nil) def add_path(path, type = nil)
asset = sprockets_environment.find_asset(path) begin
asset = sprockets_environment.find_asset(path)
rescue => e
sprockets_environment.logger.error "#{e.message} (#{e.class})"
raise e
end
@required_files << asset @required_files << asset