Let's consider the following code:
a && b && c && d
echo "Command {xyz} ended with exit code $?"
If everything goes well, it's straightforward, as all the commands return exit code of 0. But if a non-zero exit code is encountered, is it possible to say, which command returned it and broke the chain - ie. what should be in {xyz}?
PS. I know that I could use nested conditional statements instead, but the chaining construct is pretty clear and understandable - I'd only like to add a bit of analysis to it.