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