adding throw statements to registry cpi impl
adding new registry exception