From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: Is this (error (error ...)) form intentional? Date: Sat, 19 Mar 2016 08:19:46 -0400 Message-ID: <87oaaairrx.fsf@kyleam.com> References: <8737rmg3sz.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahFrK-0000zF-11 for emacs-orgmode@gnu.org; Sat, 19 Mar 2016 08:19:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ahFrF-0001yC-2S for emacs-orgmode@gnu.org; Sat, 19 Mar 2016 08:19:57 -0400 Received: from pb-smtp0.pobox.com ([208.72.237.35]:63729 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahFrE-0001xo-Ul for emacs-orgmode@gnu.org; Sat, 19 Mar 2016 08:19:52 -0400 In-Reply-To: <8737rmg3sz.fsf@mbork.pl> (Marcin Borkowski's message of "Sat, 19 Mar 2016 11:28:12 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Marcin Borkowski Cc: Org-Mode mailing list Marcin Borkowski 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