[Top][All Lists]

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

Re: Behavior of calling return from a trap

From: dave reisner
Subject: Re: Behavior of calling return from a trap
Date: Tue, 10 Apr 2012 16:25:13 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Apr 10, 2012 at 12:04:36PM -0400, Chet Ramey wrote:
> You're calling the error trap twice.  The first time you call it is after
> the `false' in the body of the function, and the `return' works as intended
> there.  Since you return 1, the call to `somefunc' fails, triggering the
> error trap again.  The second time you call it, you're not executing in a
> function context, and `return' throws an error.

Ah, of course. That makes a lot of sense. Thanks for clarifying.


reply via email to

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