handler should be restored before exception