Function Macro

GLibassert_no_errno

since: 2.66

Declaration [src]

#define g_assert_no_errno (
  expr
)

Description [src]

Debugging macro to check that an expression has a non-negative return value, as used by traditional POSIX functions (such as rmdir()) to indicate success.

If the assertion fails (i.e. the expr returns a negative value), an error message is logged and the testcase is marked as failed. The error message will contain the value of errno and its human-readable message from g_strerror().

This macro will clear the value of errno before executing expr.

Available since: 2.66

This function is not directly available to language bindings.

Parameters

expr

Type: -

The expression to check.