all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 48228@debbugs.gnu.org
Subject: bug#48228: json-serialize should signal error when dll is not found [MS Windows]
Date: Tue, 20 Jul 2021 14:50:01 +0200	[thread overview]
Message-ID: <871r7tf8ue.fsf@gnus.org> (raw)
In-Reply-To: <e2ceedba-9be3-bc61-5c08-85e0be43bb67@yandex.ru> (Dmitry Gutov's message of "Tue, 4 May 2021 18:25:05 +0300")

Dmitry Gutov <dgutov@yandex.ru> writes:

> 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")));

I've now applied a version of this change to Emacs 28 (with a new error
symbol).

The discussion here then turned towards the question of whether there
should be a `json-available-p' function, and there should.  But json.c
is slightly unusual in this respect that it's not compiled at all if
jansson isn't available, so the function will have to go somewhere else,
which is rather, er, inconvenient.

Anybody have an idea how to solve that problem?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  parent reply	other threads:[~2021-07-20 12:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-07-20 12:51   ` Lars Ingebrigtsen
2021-07-20 13:22   ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871r7tf8ue.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=48228@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.