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)


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

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