On Friday 21 of August 2009 22:56:41 David Leverton wrote: > Does anyone have any opinions on which of the four options (#1 > make die respect nonfatal, #2 make die always die, #3 add a new > die variant that respects nonfatal, #4 make regular die respect > nonfatal, and add a new variant that doesn't) we should go with? > We should definitely get this resolved and agreed on before EAPI > 3 is finalised.
I suggest #5 - drop the idea of 'nonfatal'. Quoting devmanual: "The die function should be used to indicate a fatal error and abort the build. Its parameters should be the message to display." Period. In such case, following code: nonfatal some_function when: some_function() { so_sth || die "sth failed" } only means, that "some_function" shouldn't have been equipped with 'die' mechanism, as use case appeared that demands it being non-fatal. And in this case "some_function" should be fixed to be nonfatal instead (and all existing invocations suffixed by "|| die". Simple as this. Please refrain from adding silly workarounds like this - only thing they add is unnecessary complexity and thus maintenance/debugging burden. -- regards MM
signature.asc
Description: This is a digitally signed message part.