GError

0th

Percentile

The GError object

GLib provides a standard method of reporting errors from a called function to the calling code. (This is the same problem solved by exceptions in other languages.)

Keywords
internal, interface
Details

As a transparent-type, a GError is returned to the user as a list with the following elements:

domain
a numeric vector with one named element that identifies the error domain

code
an integer code (often an enum value) identifying the specific error type within the domain

message
a descriptive error message

The domain is usually retrived via a function of the form NAME\_OF\_DOMAIN\_ERROR(). For example, for GdkPixbuf, the error domain is provided by GDK_PIXBUF_ERROR().

References

http://developer.gnome.org/doc/API/2.0/glib/glib-Error-Reporting.html

See Also

GdkPixbufError GtkFileChooserError GtkPrintError GtkRecentChooserError GtkRecentManagerError

Aliases
  • GError
  • GFileError
  • GDK_PIXBUF_ERROR
  • GTK_FILE_CHOOSER_ERROR
  • GTK_ICON_THEME_ERROR
  • G_FILE_ERROR
  • gFileErrorQuark
  • gdkPixbufErrorQuark
  • gtkIconThemeErrorQuark
  • gtkPrintErrorQuark
  • gtkRecentChooserErrorQuark
  • gtkRecentManagerErrorQuark
  • gtkBuilderErrorQuark
  • gIoErrorQuark
  • gResolverErrorQuark
Documentation reproduced from package RGtk2, version 2.20.31, License: GPL

Community examples

Looks like there are no examples yet.