[ditz-talk] [PATCH] Print more clean error message when running help on non-existing command

Daniel Kalør daniel at kalor.dk
Sat Nov 8 03:40:24 EST 2008


From: Daniel Kalør <daniel at float>

---
 bin/ditz |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/bin/ditz b/bin/ditz
index 886a8fd..ef39904 100755
--- a/bin/ditz
+++ b/bin/ditz
@@ -134,7 +134,11 @@ when "reconfigure" # might not be able to load the project
   op.do cmd, nil, config, ARGV
   exit
 when "help"
-  op.do cmd, nil, config, ARGV
+  begin
+    op.do cmd, nil, config, ARGV
+  rescue Ditz::Operator::Error => e
+    die "#{e.message}"
+  end
   exit
 end
 
-- 
1.6.0.3



More information about the ditz-talk mailing list