Relocate option parsing error handling up a level

GSoC/Meterpreter_Web_Console
Adam Cammack 2018-09-11 17:22:05 -05:00
parent 74ae89ac96
commit da25391426
No known key found for this signature in database
GPG Key ID: C9378BA088092D66
1 changed files with 2 additions and 2 deletions

View File

@ -453,6 +453,8 @@ module DispatcherShell
run_command(dispatcher, method, arguments)
found = true
end
rescue OptionParser::ParseError
print_error("#{method}: #{e.message}")
rescue
error = $!
@ -490,8 +492,6 @@ module DispatcherShell
else
dispatcher.send('cmd_' + method, *arguments)
end
rescue OptionParser::ParseError => e
print_error("#{method}: #{e.message}")
ensure
self.busy = false
end