1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-25 06:03:36 +03:00

feature #647: If the column does not exists using the -l option show an error

This commit is contained in:
Daniel Molina 2011-07-12 16:13:34 +02:00
parent 68a9e2ec27
commit b083a9e458
2 changed files with 2 additions and 9 deletions

View File

@ -192,8 +192,7 @@ module CLIHelper
size=@columns[field][:size]
return "%#{minus}#{size}.#{size}s" % [ data.to_s ]
else
puts "Column not defined"
exit -1
exit -1, "Column not defined"
end
end

View File

@ -169,13 +169,7 @@ EOT
if comm
check_args!(comm_name, comm[:arity], comm[:args_format])
begin
rc = comm[:proc].call
rescue Exception =>e
puts e.message
exit -1
end
rc = comm[:proc].call
if rc.instance_of?(Array)
puts rc[1]
exit rc.first