summaryrefslogtreecommitdiff
path: root/plugins/poppler-thumbnailer
diff options
context:
space:
mode:
authorGaël Bonithon <gael@xfce.org>2021-12-20 18:24:28 +0100
committerGaël Bonithon <gael@xfce.org>2021-12-20 18:28:59 +0100
commitad432ab47e1ede51bee08af11daca69a9ca6a216 (patch)
tree3f444ce5925150f6df48f0d153bd345fb1b48eba /plugins/poppler-thumbnailer
parentfe51cbf69d297fd391d7361877529b17118875b2 (diff)
downloadtumbler-ad432ab47e1ede51bee08af11daca69a9ca6a216.tar.gz
poppler-thumbnailer: Fix error handling
Diffstat (limited to 'plugins/poppler-thumbnailer')
-rw-r--r--plugins/poppler-thumbnailer/poppler-thumbnailer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/poppler-thumbnailer/poppler-thumbnailer.c b/plugins/poppler-thumbnailer/poppler-thumbnailer.c
index 036eb53..6fa1c1a 100644
--- a/plugins/poppler-thumbnailer/poppler-thumbnailer.c
+++ b/plugins/poppler-thumbnailer/poppler-thumbnailer.c
@@ -300,8 +300,7 @@ poppler_thumbnailer_create (TumblerAbstractThumbnailer *thumbnailer,
/* try to load the file contents using GIO */
if (!g_file_load_contents (file, cancellable, &contents, &length, NULL, &error))
{
- g_signal_emit_by_name (thumbnailer, "error", uri, TUMBLER_ERROR_UNSUPPORTED,
- error->message);
+ g_signal_emit_by_name (thumbnailer, "error", uri, error->code, error->message);
g_error_free (error);
g_object_unref (file);
return;
@@ -323,8 +322,7 @@ poppler_thumbnailer_create (TumblerAbstractThumbnailer *thumbnailer,
/* emit an error if both ways to load the document failed */
if (document == NULL)
{
- g_signal_emit_by_name (thumbnailer, "error", uri, TUMBLER_ERROR_INVALID_FORMAT,
- error->message);
+ g_signal_emit_by_name (thumbnailer, "error", uri, error->code, error->message);
g_error_free (error);
poppler_thumbnailer_free (contents);
return;