git_error_set_str

Set the error message string for this thread.

This function is public so that custom ODB backends and the like can relay an error message through libgit2. Most regular users of libgit2 will never need to call this function -- actually, calling it in most circumstances (for example, calling from within a callback function) will just end up having the value overwritten by libgit2 internals.

This error message is stored in thread-local storage and only applies to the particular thread that this libgit2 call is made from.

extern (C) nothrow @nogc
int
git_error_set_str
(,
const(char)* string_
)

Parameters

error_class int

One of the git_error_t enum above describing the general subsystem that is responsible for the error.

string_ const(char)*

The formatted error message to keep

Return Value

Type: int

0 on success or -1 on failure

Meta