From 6c2ee11d8f27cc39f852b69a49056ba76ac6bee9 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 27 Jan 2019 17:55:27 +0200 Subject: [PATCH] Improve pdump load diagnostics * src/emacs.c (load_pdump): Improve diagnostics when pdump file fails to load correctly. --- src/emacs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index aed4e0d1508..2acee8e6fea 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -813,12 +813,14 @@ load_pdump (int argc, char **argv) path_exec, DIRECTORY_SEP, argv0_base, suffix); result = pdumper_load (dump_file); } - else - fatal ("could not load dump file \"%s\": %s", - dump_file, dump_error_to_string (result)); if (result != PDUMPER_LOAD_SUCCESS) - dump_file = NULL; + { + if (result != PDUMPER_LOAD_FILE_NOT_FOUND) + fatal ("could not load dump file \"%s\": %s", + dump_file, dump_error_to_string (result)); + dump_file = NULL; + } out: return result; -- 2.39.5