Fix warning due to unused exception variable.