[poppler] Inconsistent error message

Jacob Marble jacobmarble at google.com
Wed Dec 2 15:35:32 PST 2015


Good afternoon-

I'm using the Poppler GLib API, just getting started. Please comment on
proper error handling procedures for client code.

GError error;
doc = poppler_document_new_from_file(uri, NULL, &error);

When the file identified by uri does not exist,
poppler_document_new_from_file returns NULL, and error is set to:
{ G_FILE_ERROR, G_FILE_ERROR_FAILED, "No error" }

Relying on only the message portion "No error", the user learns nothing
helpful. Should I consider this a bug in Poppler, or should my code always
check for "No error" and subsequently assemble a message based on the error
domain and code?

Thanks

Jacob Marble
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20151202/0e0f49a9/attachment.html>


More information about the poppler mailing list