Function

GLibErrornew_literal

Declaration

GError*
g_error_new_literal (
  GQuark domain,
  gint code,
  const gchar* message
)

Description

Creates a new GError; unlike g_error_new(), 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.

Parameters

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.

Return value

Returns: GError
 

A new GError.

 The caller of the function takes ownership of the data, and is responsible for freeing it.