From b4a99952bf8827a03b7fc5c668cba2db53275115 Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Thu, 16 Oct 2008 18:21:35 -0700 Subject: [PATCH] Behave better for --trace. --- lib/haml/exec.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/haml/exec.rb b/lib/haml/exec.rb index 6437452d..6ca566a2 100644 --- a/lib/haml/exec.rb +++ b/lib/haml/exec.rb @@ -24,13 +24,9 @@ module Haml @options 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 - - e.backtrace[1..-1].each { |t| $stderr.puts " #{t}" } if @options[:trace] - exit 1 end exit 0