title: Is there a cleaner way to do this in Java try-catch?
body: <pre><code>try
  {
      try
      {
          function(a, b);
      }
      catch (Exception e)
      {
          e.printStackTrace();
          throw e;
      }
  }
  catch (Exception e)
  {
      System.out.println("---------------------------------");
  }
  </code></pre>
  
  <p>I do this nested try-catch block for a reason, which is simply that when I try this</p>
  
  <pre><code>try
  {
      function(a, b);
  }
  catch (Exception e)
  {
      e.printStackTrace();
      System.out.println("---------------------------------");
  }
  </code></pre>
  
  <p>The line I print comes in the middle of the stack-trace most the time..</p>
  
  <p>My question is why does that happen most the time ? and is there a cleaner way to avoid that issue ?</p>