mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 06:26:15 +01:00
gerror: Minor clarifications to the GError documentation
• Clarify that GError** parameters are for the return of _newly allocated_ GError*s. • Clarify that errors may need to be checked for explicitly if the return value of a function doesn’t reliably indicate them. https://bugzilla.gnome.org/show_bug.cgi?id=741779
This commit is contained in:
parent
7f159f13dc
commit
bdfc8231c6
@ -52,7 +52,8 @@
|
|||||||
* functions in GLib and GTK+ do not use the #GError facility.
|
* functions in GLib and GTK+ do not use the #GError facility.
|
||||||
*
|
*
|
||||||
* Functions that can fail take a return location for a #GError as their
|
* Functions that can fail take a return location for a #GError as their
|
||||||
* last argument. For example:
|
* last argument. On error, a new #GError instance will be allocated and
|
||||||
|
* returned to the caller via this argument. For example:
|
||||||
* |[<!-- language="C" -->
|
* |[<!-- language="C" -->
|
||||||
* gboolean g_file_get_contents (const gchar *filename,
|
* gboolean g_file_get_contents (const gchar *filename,
|
||||||
* gchar **contents,
|
* gchar **contents,
|
||||||
@ -161,7 +162,8 @@
|
|||||||
* ]|
|
* ]|
|
||||||
*
|
*
|
||||||
* If the sub-function does not indicate errors other than by
|
* If the sub-function does not indicate errors other than by
|
||||||
* reporting a #GError, you need to create a temporary #GError
|
* reporting a #GError (or if its return value does not reliably indicate
|
||||||
|
* errors) you need to create a temporary #GError
|
||||||
* since the passed-in one may be %NULL. g_propagate_error() is
|
* since the passed-in one may be %NULL. g_propagate_error() is
|
||||||
* intended for use in this case.
|
* intended for use in this case.
|
||||||
* |[<!-- language="C" -->
|
* |[<!-- language="C" -->
|
||||||
|
Loading…
Reference in New Issue
Block a user