Reduce code duplication in draw loops, and remove hiding of exceptions