Permalink
Browse files

Add guard notification for SASS syntax errors

  • Loading branch information...
1 parent 9b8fd6e commit f8be06158e3e3713da26a8a99bc250023b1e049f @bradphelan bradphelan committed Apr 19, 2012
Showing with 10 additions and 1 deletion.
  1. +10 −1 lib/guard/compass.rb
View
@@ -103,7 +103,16 @@ def cleanup_options
def perform
if valid_sass_path?
- @updater.execute
+ begin
+ @updater.execute
+ rescue Sass::SyntaxError => e
+ msg = "#{e.sass_backtrace_str}"
+ ::Guard::Notifier.notify msg, :title => "Guard Compass", :image => :failed
+ return false
+ rescue Exception => e
+ ::Guard::Notifier.notify e.to_s, :title => "Guard Compass", :image => :failed
+ return false
+ end
true
else
false

0 comments on commit f8be061

Please sign in to comment.