Refactoring Exception Info and added Unit Testcaes for Registry