wrap iterating over datasources in an exception handler