Prepare to migrate away from GLib. Currently, we're still using GLib as a backend.
Replaces GLib's GError.