Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: _dispatch (was Re: PATCH: [for consideration] TMPSUFFIX)



On Sep 30,  7:03am, Daniel Shahaf wrote:
} Subject: Re: _dispatch (was Re: PATCH: [for consideration] TMPSUFFIX)
}
} Bart Schaefer wrote on Thu, Sep 29, 2016 at 00:30:47 -0700:
} > The important bit would be that ERRFLAG_EVAL never converts directly
} > back into ERRFLAG_ERROR, so if the script ignores TRY_BLOCK_ERROR
} > then all errors disappear at the end of the always-block.
} 
} This makes sense, but wouldn't it also require some way for the always
} block to (manually) set ERRFLAG_ERROR again upon an ERRFLAG_EVAL, in
} order to "abort enough code" (which was the original issue)?
} 
} The interface could be [...] a setfn on TRY_BLOCK_ERROR

That's what I was thinking of, yes.  There's already a setfn that
reacts to TRY_BLOCK_ERROR=0 so it wouldn't be hard to have one that
notices when TRY_BLOCK_ERROR changes from 2 to 1 or some such.

I'm not sure what kind of gyrations would be required for eval to be
aware that it's inside a try-block, though.



Messages sorted by: Reverse Date, Date, Thread, Author