execute_on_exception in batches

Ties to issue #134