lib/erector/erect.rb in erector-0.2.83 vs lib/erector/erect.rb in erector-0.3.105
- old
+ new
@@ -88,10 +88,11 @@
e = Erector::Erected.new(file)
e.convert
say " --> #{e.filename}\n"
rescue => e
puts e
+ puts e.backtrace.join("\n\t")
puts
end
end
end
@@ -107,10 +108,11 @@
widget_name = camelize(filename)
widget_class = constantize(widget_name)
if widget_class < Erector::Widget
widget = widget_class.new
+ #todo: skip if it's missing a no-arg constructor
dir = output_dir || File.dirname(file)
FileUtils.mkdir_p(dir)
output_file = "#{dir}/#{filename}.html"
File.open(output_file, "w") do |f|
f.puts widget.to_s
@@ -119,10 +121,10 @@
else
say " -- not a widget, skipping\n"
end
rescue => e
puts e
- puts
+ puts e.backtrace.join("\n\t")
end
end
end
# stolen from activesuppport/lib/inflector.rb