Add a rescue to catch method missing for stage_payload

This allows us to provide a friendlier message to users when they are
using a stageless listener with a staged payload.
bug/bundler_fix
OJ 2016-03-29 09:35:53 +10:00
parent 72bde63397
commit 6523600952
1 changed files with 26 additions and 21 deletions

View File

@ -331,6 +331,7 @@ protected
resp['Content-Type'] = 'application/octet-stream'
begin
# generate the stage, but pass in the existing UUID and connection id so that
# we don't get new ones generated.
blob = obj.stage_payload(
@ -354,6 +355,10 @@ protected
:ssl => ssl?,
:payload_uuid => uuid
})
rescue NoMethodError
print_error("Staging failed. This can occur when stageless listeners are used with staged payloads.")
return
end
when :connect
print_status("#{cli.peerhost}:#{cli.peerport} (UUID: #{uuid.to_s}) Attaching orphaned/stageless session ...")