On Mon, 24 Aug 2009 15:09:52 -0700 Zac Medico <[email protected]> wrote: > > I'd like die to respect nonfatal. People using nonfatal should > > check beforehand that the functions they're calling won't do > > anything stupid if die's are ignored. > > If you're doing that then it might be wise to add an 'assert' helper > that is guaranteed to generate an exception regardless of 'nonfatal' > status.
Probably not the best choice of name... 'assert' is already in use for checking PIPESTATUS. The other problem with doing things that way is that people have to start writing code that does an EAPI check just to be able to force a die. An IGNORE_NONFATAL environment variable, whilst slightly ickier, avoids that issue if we do change the definitions of die and nonfatal. *shrug* I still think the way it was originally worded is the best option. Otherwise we'll just replace the "some helpers die, some don't, and no-one knows which" situation with "some eclass functions are nonfatal aware, some aren't, and no-one knows which", with an added side helping of "people need to find out whether any of the callers in any overlay anywhere expect this function to work with nonfatal before changing it". -- Ciaran McCreesh
signature.asc
Description: PGP signature
