title: How to catch com.microsoft.sqlserver.jdbc.SQLServerException: The query has timed out
body: <p>I am having some of the stored procedures in the MS-SQL and I wanted to do certain piece of codes in case of timeout issue. I have done a few things which I want to share:</p>
  
  <pre><code>catch (Exception e) {
  boolean bool = e.getClass().equals(SQLServerException.class);
    if(bool){
    //-- My piece of code logic
   }
  }
  </code></pre>
  
  <p>My problem is, I want to do my piece of code in case of only </p>
  
  <pre><code>    com.microsoft.sqlserver.jdbc.SQLServerException: The query has timed out
  </code></pre>
  
  <p>How to catch that particular timeout exception?</p>