libgit2

git_error_last

Version:

Return the last git_error object that was generated for the current thread.

This function will never return NULL.

Callers should not rely on this to determine whether an error has occurred. For error checking, callers should examine the return codes of libgit2 functions.

This call can only reliably report error messages when an error has occurred. (It may contain stale information if it is called after a different function that succeeds.)

The memory for this object is managed by libgit2. It should not be freed.

Signature

const git_error *git_error_last();

Returns

A git_error object.

Versions