git_error_last

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

The default behaviour of this function is to return NULL if no previous error has occurred. However, libgit2's error strings are not cleared aggressively, so a prior (unrelated) error may be returned. This can be avoided by only calling this function if the prior call to a libgit2 API returned an error.

extern (C) nothrow @nogc
const(.git_error)*
git_error_last
()

Return Value

Type: const(.git_error)*

A git_error object.

Meta