Fix Sonar's "Generic exceptions should never be thrown" Change-Id: I71ab877166a094dbe07f1a6d2cf46a8dc12300ea