Fixed problem with exception handling.

master
Jakub Stastny aka botanicus 2011-06-05 20:01:32 +02:00
parent 26f81b6932
commit 35c3b9b914
1 changed files with 7 additions and 2 deletions

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