Behave better for --trace.
This commit is contained in:
parent
3d05530818
commit
b4a99952bf
|
@ -24,13 +24,9 @@ module Haml
|
||||||
|
|
||||||
@options
|
@options
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
raise e if e.is_a? SystemExit
|
raise e if @options[:trace] || e.is_a?(SystemExit)
|
||||||
|
|
||||||
$stderr.print "#{e.class} on line #{get_line e}: " if @options[:trace]
|
|
||||||
$stderr.puts e.message
|
$stderr.puts e.message
|
||||||
|
|
||||||
e.backtrace[1..-1].each { |t| $stderr.puts " #{t}" } if @options[:trace]
|
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue