lib/command.rb in dev_tasks-1.0.22 vs lib/command.rb in dev_tasks-1.0.23

- old
+ new

@@ -31,10 +31,16 @@ self[:start_time]=Time.now timer=Timer.new if self[:input].include?('<%') && self[:input].include?('%>') ruby = self[:input].gsub("<%","").gsub("%>","") - self[:output]=eval(ruby) + + begin + self[:output]=eval(ruby) + rescue + raise "unable to eval(#{ruby})" + end + #puts " " + timer.elapsed_str self[:elapsed] = timer.elapsed_str self[:end_time] = Time.now else self[:output] = `#{self[:input]}` \ No newline at end of file