unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Defining functions within `condition-case'
@ 2024-12-25 10:37 Jean Louis
  2024-12-25 19:57 ` Michael Heerdegen via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 4+ messages in thread
From: Jean Louis @ 2024-12-25 10:37 UTC (permalink / raw)
  To: Help GNU Emacs

Is there any argument against following notion:

;; -*- lexical-binding: t; -*-

(condition-case my

    (defun my-2-hello ()
      (message "I am `my-hello'"))
      
  (error (message "%s" my)))

(my-2-hello) ➜ "I am ‘my-hello’"

I am testing it, it seems that it works.

The reason for this is website application development. I would like
to ensure that, in case of any errors, I can access a function to
inform me what went wrong. These errors should be presented over an
HTTP connection, and I do not intend to inspect them through Emacs
directly.

Jean Louis



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

end of thread, other threads:[~2024-12-26 23:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-25 10:37 Defining functions within `condition-case' Jean Louis
2024-12-25 19:57 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-12-26 11:19   ` Jean Louis
2024-12-26 23:22     ` Michael Heerdegen via Users list for the GNU Emacs text editor

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).