class ssh::SshException

Overview

Some people do not like C++ exceptions. Moreā€¦

#include <include/libssh/libsshpp.hpp>

class SshException {
public:
    // construction

    SshException(ssh_session csession);
    SshException(const SshException& e);

    // methods

    int
    getCode();

    std::string
    getError();
};

Detailed Documentation

Some people do not like C++ exceptions.

With this define, we give the choice to use or not exceptions. if defined, disable C++ exceptions for libssh c++ wrapperThis class describes a SSH Exception object. This object can be thrown by several SSH functions that interact with the network, and may fail because of socket, protocol or memory errors.

Methods

int
getCode()

returns the Error code

Returns:

SSH_FATAL Fatal error happened (not recoverable)

SSH_REQUEST_DENIED Request was denied by remote host

See also:

ssh_get_error_code

std::string
getError()

returns the error message of the last exception

Returns:

pointer to a c string containing the description of error

See also:

ssh_get_error