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)
Extract strings to static final fields
Format per coding standard