improve exception vs. exit handling

Hi,

this PR just fixups a few exception blocks which may swallow exit exceptions.