unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#48228: json-serialize should signal error when dll is not found [MS Windows]
@ 2021-05-04 15:25 Dmitry Gutov
  2021-05-04 15:46 ` Philipp Stephani
  2021-07-20 12:50 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 30+ messages in thread
From: Dmitry Gutov @ 2021-05-04 15:25 UTC (permalink / raw)
  To: 48228

Tags: patch

As discussed on Emacs Help.

Another commenter suggested signaling a specific error. Please advise 
what to name it and where to put it.

diff --git a/src/json.c b/src/json.c
index 3f1d27ad7f..ece057ae41 100644
--- a/src/json.c
+++ b/src/json.c
@@ -596,8 +596,7 @@ DEFUN ("json-serialize", Fjson_serialize, 
Sjson_serialize, 1, MANY,
      }
    if (!json_initialized)
      {
-      message1 ("jansson library not found");
-      return Qnil;
+      Fsignal (Qerror, list1 (build_unibyte_string ("jansson library 
not found")));
      }
  #endif

@@ -707,8 +706,7 @@ DEFUN ("json-insert", Fjson_insert, Sjson_insert, 1, 
MANY,
      }
    if (!json_initialized)
      {
-      message1 ("jansson library not found");
-      return Qnil;
+      Fsignal (Qerror, list1 (build_unibyte_string ("jansson library 
not found")));
      }
  #endif

@@ -966,8 +964,7 @@ DEFUN ("json-parse-string", Fjson_parse_string, 
Sjson_parse_string, 1, MANY,
      }
    if (!json_initialized)
      {
-      message1 ("jansson library not found");
-      return Qnil;
+      Fsignal (Qerror, list1 (build_unibyte_string ("jansson library 
not found")));
      }
  #endif

@@ -1065,8 +1062,7 @@ DEFUN ("json-parse-buffer", Fjson_parse_buffer, 
Sjson_parse_buffer,
      }
    if (!json_initialized)
      {
-      message1 ("jansson library not found");
-      return Qnil;
+      Fsignal (Qerror, list1 (build_unibyte_string ("jansson library 
not found")));
      }
  #endif





^ permalink raw reply related	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2021-07-20 13:22 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-04 15:25 bug#48228: json-serialize should signal error when dll is not found [MS Windows] Dmitry Gutov
2021-05-04 15:46 ` Philipp Stephani
2021-05-04 15:49   ` Dmitry Gutov
2021-05-04 16:08     ` Eli Zaretskii
2021-05-04 16:10       ` Dmitry Gutov
2021-05-04 16:43         ` Robert Pluim
2021-05-04 16:59           ` Dmitry Gutov
2021-05-04 17:42             ` Eli Zaretskii
2021-05-04 17:47               ` Dmitry Gutov
2021-05-04 18:07                 ` Eli Zaretskii
2021-05-05 22:36                   ` Dmitry Gutov
2021-05-06 15:26                     ` Nikolay Kudryavtsev
2021-05-06 15:45                       ` Eli Zaretskii
2021-05-06 16:13                         ` Nikolay Kudryavtsev
2021-05-06 16:18                           ` Eli Zaretskii
2021-05-06 16:29                             ` Nikolay Kudryavtsev
2021-05-06 16:36                               ` Eli Zaretskii
2021-05-06 16:42                                 ` Nikolay Kudryavtsev
2021-05-06 16:46                                   ` Eli Zaretskii
2021-05-06 17:02                                     ` Nikolay Kudryavtsev
2021-05-06 17:11                                   ` Dmitry Gutov
2021-05-06 17:36                                     ` Nikolay Kudryavtsev
2021-05-06 17:55                                       ` Eli Zaretskii
2021-05-08  4:48                               ` Richard Stallman
2021-05-04 16:44         ` Eli Zaretskii
2021-05-04 17:00           ` Dmitry Gutov
2021-05-04 17:44             ` Eli Zaretskii
2021-07-20 12:50 ` Lars Ingebrigtsen
2021-07-20 12:51   ` Lars Ingebrigtsen
2021-07-20 13:22   ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).