Fixed problem with exception handling.
This commit is contained in:
parent
26f81b6932
commit
35c3b9b914
1 changed files with 7 additions and 2 deletions
|
@ -19,9 +19,14 @@ rescue LoadError
|
||||||
abort "You have to install simple-templater first!"
|
abort "You have to install simple-templater first!"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
templater = SimpleTemplater.new(:ace)
|
||||||
|
generator = templater.find(:project)
|
||||||
|
|
||||||
|
if generator.nil?
|
||||||
|
abort "Generator not found!"
|
||||||
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
templater = SimpleTemplater.new(:ace)
|
|
||||||
generator = templater.find(:project)
|
|
||||||
generator.run(ARGV)
|
generator.run(ARGV)
|
||||||
rescue SimpleTemplater::TargetAlreadyExist => exception
|
rescue SimpleTemplater::TargetAlreadyExist => exception
|
||||||
abort exception.message
|
abort exception.message
|
||||||
|
|
Loading…
Add table
Reference in a new issue