1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Fixes up the error messages on invalid options to commands

git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@309 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
zedshaw 2006-08-08 09:23:26 +00:00
parent 6d89030158
commit f60b973368

View file

@ -182,9 +182,13 @@ module Mongrel
# command exists, set it up and validate it
begin
command = GemPlugin::Manager.instance.create("/commands/#{cmd_name}", :argv => args)
rescue OptionParser::InvalidOption
STDERR.puts "#$! for command '#{cmd_name}'"
STDERR.puts "Try #{cmd_name} -h to get help."
return false
rescue
STDERR.puts "INVALID COMMAND: #$!"
print_command_list
STDERR.puts "ERROR RUNNING '#{cmd_name}': #$!"
STDERR.puts "Use help command to get help"
return false
end