Changed to library specific exception. Added code required for using ResponseCache to ApiGenerator.