Handle exceptions raised from inside the block