[Poppler-bugs] [Bug 73269] install error callback to redirect errors to the GLib logging framework

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Jan 19 07:46:32 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=73269

--- Comment #6 from Carlos Garcia Campos <carlosgc at gnome.org> ---
Comment on attachment 92386
  --> https://bugs.freedesktop.org/attachment.cgi?id=92386
make the strings a bit more informative

Review of attachment 92386:
-----------------------------------------------------------------

Yes, a lot simpler, and we don't need new API nor even change evince.

::: glib/poppler.cc
@@ +90,5 @@
> +      category == errCommandLine ||
> +      category == errNotAllowed)
> +    return;
> +
> +  g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO,

Shouldn't we use "Poppler" as log domain?

@@ +95,5 @@
> +         "%s at position %" G_GOFFSET_FORMAT ": %s",
> +         cat_str[category], (goffset) pos, message);
> +}
> +
> +static void poppler_constructor (void) __attribute__((__constructor__));

Why do you need this prototype? I think you can annotate the method directly,
for example:

static void __attribute__((__constructor__)) poppler_constructor (void)
{
  setErrorCallback (error_cb, NULL);
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20140119/222010ec/attachment.html>


More information about the Poppler-bugs mailing list