improve handling and testing of exceptions during batch processing; clos...

...es #621