Adding exception mechanism