HPCC-9098 Fix release of an exception that could be rethrown

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

HPCC-9098 Fix release of an exception that could be rethrown

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>