How to resolve 'Define and throw a dedicated exception instead of using a generic one.'
<p>I need to <code>throw RuntimeException</code> when length of two lists is not equal. We are using <code>SonarQube</code> tool for code review purpose.</p>

<p><strong>Here is the code:</strong></p>

<pre><code>if (objctArray.length != columnArray.length) {
                throw new RuntimeException(String.format("objctArray and columnArray length is not same. objctArray length = %d, columnArray length = %d", objctArray.length, columnArray.length));
            }
</code></pre>

<p>Now, <code>SonarQube</code> raises issue that <code>Define and throw a dedicated exception instead of using a generic one.</code> at <code>throw new RuntimeException</code> line. I don't know which exception I can replace to resolve <code>SonarQube</code> issue.</p>