On Wed, 25 Nov 2009, Andreas Gruenbacher wrote: > On Wednesday 25 November 2009 10:44:51 Jean Delvare wrote: > > What about just fixing the bug that was reported, first? > > I've done that now, but that doesn't address the more general problem. On > the > other hand, "set -e" also doesn't do the "right thing" for anything but > simple > commands -- it looks a bit like exception handling in more powerful > programming languages, but in fact it's not.
It ensures the program stops as soon as an unexpected failure happens, in general it limits the amount of damage given an unexpected situation and makes the program return a non-zero error code so that the caller knows that something went wrong. I agree it's not as powerful as exception handling in other languages but it forces to think about return values of programs just like you should always check the return code of system calls in C. We use it in all maintainer scripts of Debian packages (where it's even more important given that they run as root). I don't know what the best strategy is, but putting "set -e" in the scripts and running the test suite is a good start I guess. After that developers running master could provide a wider test-base. Cheers, -- Raphaƫl Hertzog _______________________________________________ Quilt-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/quilt-dev
