Occ catching errors

fixes #11165

@LukasReschke @icewind1991 @th3fallen  @bantu THX