Merge pull request #88 from andurin/small_fixes

RPC Client exception handling
unstable
HD Moore 2011-12-29 22:13:35 -08:00
commit 409970ec36
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ class Client
resp = MessagePack.unpack(res.body)
if resp and resp.kind_of?(::Hash) and resp['error'] == true
raise Msf::RPC::ServerException.new(res.code, resp['error_message'] || resp['error_string'], resp['error_class'], resp['error_backtrace'])
raise Msf::RPC::ServerException.new(resp['error_code'] || res.code, resp['error_message'] || resp['error_string'], resp['error_class'], resp['error_backtrace'])
end
return resp