Skip to content
  • Robert Bragg's avatar
    Adds CoglError api · df21e20f
    Robert Bragg authored
    Although we use GLib internally in Cogl we would rather not leak GLib
    api through Cogl's own api, except through explicitly namespaced
    cogl_glib_ / cogl_gtype_ feature apis.
    
    One of the benefits we see to not leaking GLib through Cogl's public API
    is that documentation for Cogl won't need to first introduce the Glib
    API to newcomers, thus hopefully lowering the barrier to learning Cogl.
    
    This patch provides a Cogl specific typedef for reporting runtime errors
    which by no coincidence matches the typedef for GError exactly.  If Cogl
    is built with --enable-glib (default) then developers can even safely
    assume that a CoglError is a GError under the hood.
    
    This patch also enforces a consistent policy for when NULL is passed as
    an error argument and an error is thrown. In this case we log the error
    and abort the application, instead of silently ignoring it. In common
    cases where nothing has been implemented to handle a particular error
    and/or where applications are just printing the error and...
    df21e20f