emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Marcin Borkowski <mbork@mbork.pl>
Cc: Org-Mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Is this (error (error ...)) form intentional?
Date: Sat, 19 Mar 2016 08:19:46 -0400	[thread overview]
Message-ID: <87oaaairrx.fsf@kyleam.com> (raw)
In-Reply-To: <8737rmg3sz.fsf@mbork.pl> (Marcin Borkowski's message of "Sat, 19 Mar 2016 11:28:12 +0100")

Marcin Borkowski <mbork@mbork.pl> writes:

> From org.el:
>
> (defun org-back-to-heading (&optional invisible-ok)
>   "Call `outline-back-to-heading', but provide a better error message."
>   (condition-case nil
>       (outline-back-to-heading invisible-ok)
>     (error (error "Before first headline at position %d in buffer %s"
> 		  (point) (current-buffer)))))
>
> Frankly, I don't see the point of nesting `error'.

One is matching the signaled error, and the other is re-throwing the
error with position and buffer information included.

--
Kyle

      reply	other threads:[~2016-03-19 12:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-19 10:28 Is this (error (error ...)) form intentional? Marcin Borkowski
2016-03-19 12:19 ` Kyle Meyer [this message]

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=87oaaairrx.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mbork@mbork.pl \
    /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).