libssh2_session_set_last_error.3 985 B

123456789101112131415161718192021222324252627282930313233
  1. .TH libssh2_session_set_last_error 3 "26 Oct 2015" "libssh2 1.6.1" "libssh2 manual"
  2. .SH NAME
  3. libssh2_session_set_last_error - sets the internal error state
  4. .SH SYNOPSIS
  5. #include <libssh2.h>
  6. int
  7. libssh2_session_set_last_error(LIBSSH2_SESSION *session, int errcode, const char *errmsg)
  8. .SH DESCRIPTION
  9. \fIsession\fP - Session instance as returned by
  10. .BR libssh2_session_init_ex(3)
  11. \fIerrcode\fP - One of the error codes as defined in the public
  12. libssh2 header file.
  13. \fIerrmsg\fP - If not NULL, a copy of the given string is stored
  14. inside the session object as the error message.
  15. This function is provided for high level language wrappers
  16. (i.e. Python or Perl) and other libraries that may extend libssh2 with
  17. additional features while still relying on its error reporting
  18. mechanism.
  19. .SH RETURN VALUE
  20. Numeric error code corresponding to the the Error Code constants.
  21. .SH AVAILABILITY
  22. Added in 1.6.1
  23. .SH SEE ALSO
  24. .BR libssh2_session_last_error(3)
  25. .BR libssh2_session_last_errno(3)