HPCC-12763 Do not release exceptions if it is rethrown

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #6776 from ghalliday/issue12763

HPCC-12763 Do not release exceptions if it is rethrown

Reviewed-By: Richard Chapman <rchapman@hpccssytems.com>