lib/scaffoldhub/helper.rb in scaffoldhub-0.0.13 vs lib/scaffoldhub/helper.rb in scaffoldhub-0.0.14

- old
+ new

@@ -19,46 +19,49 @@ scaffold_spec.select_files(type).each do |template_file| yield template_file.download! end rescue Errno::ENOENT => e say_status :error, e.message, :red + raise e rescue Scaffoldhub::NotFoundException => e - say_status :error, "HTTP 404 not found error for #{e.message}", :red + say_status :error, "HTTP 404 error - did you misspell \"#{scaffold_name}\"?", :red + raise e rescue Scaffoldhub::NetworkErrorException => e say_status :error, "HTTP error connecting to #{e.message}", :red + raise e end end def find_template_file(type) begin template_file = scaffold_spec.find_file(type) template_file.download! unless template_file.nil? rescue Errno::ENOENT => e say_status :error, e.message, :red - nil + raise e rescue Scaffoldhub::NotFoundException => e - say_status :error, "HTTP 404 not found error for #{e.message}", :red - nil + say_status :error, "HTTP 404 error - did you misspell \"#{scaffold_name}\"?", :red + raise e rescue Scaffoldhub::NetworkErrorException => e say_status :error, "HTTP error connecting to #{e.message}", :red - nil + raise e end end def each_gem begin if (gems = scaffold_spec.gems) gems.each { |gem| yield gem } end rescue Errno::ENOENT => e say_status :error, e.message, :red - nil + raise e rescue Scaffoldhub::NotFoundException => e - say_status :error, "HTTP 404 not found error for #{e.message}", :red - nil + say_status :error, "HTTP 404 error - did you misspell \"#{scaffold_name}\"?", :red + raise e rescue Scaffoldhub::NetworkErrorException => e say_status :error, "HTTP error connecting to #{e.message}", :red - nil + raise e end end def scaffold_spec Helper.scaffold_spec ||= download_scaffold_spec!