Function

GLibset_error_literal

Declaration

void
g_set_error_literal (
  GError** err,
  GQuark domain,
  gint code,
  const gchar* message
)

Description

Does nothing if err is NULL; if err is non-NULL, then err must be NULL. A new GError is created and assigned to err. Unlike g_set_error(), message is not a printf()-style format string. Use this function if message contains text you don’t have control over, that could include printf() escape sequences.

Available since:2.18

Parameters

err GError
 

A return location for a GError.

 The argument will be set by the function.
 The argument can be NULL.
 The called function takes ownership of the data, and is responsible for freeing it.
domain GQuark
 

Error domain.

code gint
 

Error code.

message const gchar*
 

Error message.

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.