Module: Arachni::RPC::Exceptions

Defined in:
lib/arachni/rpc/exceptions.rb

Defined Under Namespace

Classes: Base, ConnectionError, InvalidMethod, InvalidObject, InvalidToken, RemoteException, SSLPeerVerificationFailed

Class Method Summary (collapse)

Class Method Details

+ (Exception) from_response(response)

Returns an exception based on the response object.

Parameters:

Returns:

  • (Exception)


69
70
71
72
73
74
75
# File 'lib/arachni/rpc/exceptions.rb', line 69

def self.from_response( response )
    obj = response.obj
    klass = Arachni::RPC::Exceptions.const_get( obj['type'].to_sym )
    e = klass.new( obj['exception'] )
    e.set_backtrace( obj['backtrace'] )
    e
end