From: Ihor Radchenko <yantar92@posteo.net>
To: Damien Cassou <damien@cassou.me>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Avoid crash in `org-file-contents' in case of network failure
Date: Wed, 22 Feb 2023 09:30:48 +0000 [thread overview]
Message-ID: <87y1oqcaif.fsf@localhost> (raw)
In-Reply-To: <87cz66278h.fsf@cassou.me>
Damien Cassou <damien@cassou.me> writes:
> * lisp/org.el (org-file-contents): Wrap the
> `url-retrieve-synchronously' call into a `condition-case' block to
> avoid throwing an error when NOERROR is non-nil.
Thanks for the patch!
Few comments.
> Subject: [PATCH] Avoid crash in `org-file-contents' in case of network failure
>
> * lisp/org.el (org-file-contents): Wrap the
> `url-retrieve-synchronously' call into a `condition-case' block to
> avoid throwing an error when NOERROR is non-nil.
According to our records in https://orgmode.org/worg/contributors.html,
you haven't signed FSF copyright agreement. May you add a TINYCHANGE
cookie to the commit message as required by
https://orgmode.org/worg/org-contribute.html#first-patch
> + (error (if noerror
> + (message "%s %S" (car error) (cdr error))
> + (signal (car error) (cdr error)))))
I think that it will be a good idea to indicate in the `message' where
the error is coming from. The error intercepted by this `condition-case'
form will likely be a network error, and it may be unclear to the user
which function is failing to make the connection.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
next prev parent reply other threads:[~2023-02-22 9:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-18 17:50 [PATCH] Avoid crash in `org-file-contents' in case of network failure Damien Cassou
2023-02-22 9:30 ` Ihor Radchenko [this message]
2023-02-24 7:08 ` Damien Cassou
2023-02-24 10:17 ` Ihor Radchenko
2023-02-24 10:24 ` Damien Cassou
2023-02-26 11:44 ` Ihor Radchenko
2023-02-28 9:22 ` Bastien Guerry
2023-03-01 10:04 ` Ihor Radchenko
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y1oqcaif.fsf@localhost \
--to=yantar92@posteo.net \
--cc=damien@cassou.me \
--cc=emacs-orgmode@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.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).