Fix [SonarQube] Generic exceptions Error, RuntimeException, Throwable
and Exception should never be thrown (Define and throw a dedicated
exception instead of using a generic one)