module Sass::Plugin
def exception_string(e)
def exception_string(e) if options[:full_exception] e_string = "#{e.class}: #{e.message}" if e.is_a? Sass::SyntaxError e_string << "\non line #{e.sass_line}" if e.sass_filename e_string << " of #{e.sass_filename}" if File.exists?(e.sass_filename) e_string << "\n\n" min = [e.sass_line - 5, 0].max File.read(e.sass_filename).rstrip.split("\n")[ min .. e.sass_line + 5 ].each_with_index do |line, i| e_string << "#{min + i + 1}: #{line}\n" end end end end <<END ring} ace:\n#{e.backtrace.join("\n")} efore { e-space: pre; -family: monospace; ent: "#{e_string.gsub('"', '\"').gsub("\n", '\\A ')}"; } # Fix an emacs syntax-highlighting hiccup: ' else "/* Internal stylesheet error */" end end