title: Java error: New exception is thrown in catch block, original stack trace may be lost
body: <pre><code>try {
      // code which throws exception.
  } catch (SQLException sqlex) {
      logger.error("Custom message", sqlex);
      **throw new CustomApplicationException("Custom message", sqlex);**
  }
  </code></pre>
  
  <p>In the above example, on the bold line, I am getting PMD error as "New exception is thrown in catch block, original stack trace may be lost". I know this question has been asked many times also there are many online references available for the same. I have tried all the ways possible. But still I am not able to remove this PMD error. Please let me know whats wrong in this code slice.
  Thanks in advance!</p>