Skip to content

Commit

Permalink
Merge pull request sass#498 from saper/exc_as_string
Browse files Browse the repository at this point in the history
Return an exception message to stderr
  • Loading branch information
xzyfer committed Sep 20, 2015
2 parents 5c7b232 + ef44f44 commit 1640608
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sass_spec/engine_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ def compile(sass_filename, style)
css_output = Sass.compile_file(sass_filename.to_s, :style => style.to_sym)
[css_output, captured_stderr.to_s, 0]
rescue Sass::SyntaxError => e
[Sass::SyntaxError.exception_to_css(e), captured_stderr.string, 1]
["", "Error: " + e.message.to_s, 1]
rescue => e
[Sass::SyntaxError.exception_to_css(e), captured_stderr.string, 2]
["", e.to_s, 2]
end
ensure
$stderr = real_stderr
Expand Down

0 comments on commit 1640608

Please sign in to comment.