From 35c3b9b914ef5dd5dd26cd4cd47f546db3ac7b7d Mon Sep 17 00:00:00 2001 From: Jakub Stastny aka botanicus Date: Sun, 5 Jun 2011 20:01:32 +0200 Subject: [PATCH] Fixed problem with exception handling. --- bin/ace-gen | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/ace-gen b/bin/ace-gen index daebe2a..9a5aa08 100755 --- a/bin/ace-gen +++ b/bin/ace-gen @@ -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