### Function

# GLib prefix_error

since: 2.16

#### Declaration

    void
    g_prefix_error (
      GError** err,
      const gchar* format,
      ...
    )

#### Description

Formats a string according to `format` and prefix it to an existing error message. If `err` is `NULL` (ie: no error variable) then do nothing.

If *`err` is `NULL` (ie: an error variable is present but there is no error condition) then also do nothing.

Available since: 2.16

This function is not directly available to language bindings.

#### Parameters

`err`

  Type: `GError`

  A return location for a `GError`.

  The argument will be modified by the function.
  The argument can be set to `NULL` by the function.
  The argument can be `NULL`.
  The caller of the function takes ownership of the data, and is responsible for freeing it.

`format`

  Type: `const gchar*`

  Printf()-style format string.

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

`...`

  Type: ``

  Arguments to `format`.