From b65a3edaa283040b59122966f28978574277ef07 Mon Sep 17 00:00:00 2001 From: Marcus Mateus Date: Mon, 18 Jun 2012 01:26:46 -0500 Subject: [PATCH] Added Sprockets logger and now log asset pipeline compilation exceptions --- lib/jasmine/headless/files_list.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/jasmine/headless/files_list.rb b/lib/jasmine/headless/files_list.rb index 4deeef9..a390b17 100644 --- a/lib/jasmine/headless/files_list.rb +++ b/lib/jasmine/headless/files_list.rb @@ -154,6 +154,9 @@ module Jasmine::Headless end end + + @sprockets_environment.logger = Logger.new(STDOUT) + @sprockets_environment.logger.level = Logger::WARN @sprockets_environment end @@ -291,7 +294,12 @@ module Jasmine::Headless end 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