Re: [RFC] Logically composable variant of errexit

2014-10-10 Thread Andreas Grünbacher
2014-10-10 8:38 GMT+02:00 Dan Douglas : > I would still propose that a simple and powerful way to extend Bash with > exception handling would be to extend the ERR trap by passing it some metadata > about the type and location of the exception incurred so that it can be > handled > by user code. Th

Re: [RFC] Logically composable variant of errexit

2014-10-10 Thread Andreas Grünbacher
2014-10-10 3:29 GMT+02:00 Chet Ramey : > What does logically composable mean in this context? I would like the hypothetical errfail option to: * Behave like errexit at the top level (outside of functions). * Be inherited by functions, subshells, and command substitution. * Inside functions,

[RFC] Logically composable variant of errexit

2014-10-09 Thread Andreas Grünbacher
Hi all, the errexit option can be very useful in simple scripts. This option is being ignored in many contexts like lists and conditionals though. I understand that this is "by design" and that errexit cannot be "fixed" to behave more reasonably. Still, this makes bash a lot less useful than it co