Module: Compass::Exec
- Defined in:
- lib/compass/exec.rb
Defined Under Namespace
Classes: Compass
Class Method Summary collapse
Class Method Details
.get_file(exception) ⇒ Object
19 20 21 |
# File 'lib/compass/exec.rb', line 19 def get_file(exception) exception.backtrace[0].split(/:/, 2)[0] end |
.get_line(exception) ⇒ Object
23 24 25 |
# File 'lib/compass/exec.rb', line 23 def get_line(exception) exception.backtrace[0].scan(/:(\d+)/)[0] end |
.report_error(e, options) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/compass/exec.rb', line 10 def report_error(e, ) $stderr.puts "#{e.class} on line #{get_line e} of #{get_file e}: #{e.}" if [:trace] e.backtrace[1..-1].each { |t| $stderr.puts " #{t}" } else $stderr.puts "Run with --trace to see the full backtrace" end end |