Fixed problem with exception handling.

This commit is contained in:
Jakub Stastny aka botanicus 2011-06-05 20:01:32 +02:00
parent 26f81b6932
commit 35c3b9b914

View file

@ -19,9 +19,14 @@ rescue LoadError
abort "You have to install simple-templater first!"
end
templater = SimpleTemplater.new(:ace)
generator = templater.find(:project)
if generator.nil?
abort "Generator not found!"
end
begin
templater = SimpleTemplater.new(:ace)
generator = templater.find(:project)
generator.run(ARGV)
rescue SimpleTemplater::TargetAlreadyExist => exception
abort exception.message