quitOnError, part 1

This code has been tested and works (I can upload a modification to the demo app if you like).  It is only the first half of issue #45, but still represents enough of a feature that I think it should be merged.