[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Is this (error (error ...)) form intentional?

From: Kyle Meyer
Subject: Re: [O] Is this (error (error ...)) form intentional?
Date: Sat, 19 Mar 2016 08:19:46 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux)

Marcin Borkowski <address@hidden> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]