Catch exceptions and return value

This commit is contained in:
sinn3r
2013-01-28 10:30:59 -06:00
parent 169f91159e
commit fc833ea8df
@@ -342,8 +342,15 @@ class Console::CommandDispatcher::Core
return
end
server = client.sys.process.open
print_status("Migrating from #{server.pid} to #{pid}...")
begin
server = client.sys.process.open
rescue TimeoutError => e
elog(e.to_s)
rescue RequestError => e
elog(e.to_s)
end
server ? print_status("Migrating from #{server.pid} to #{pid}...") : print_status("Migrating to #{pid}")
# Do this thang.
client.core.migrate(pid)