title: How do I know the type of the exception being thrown at the bytecode level?
body: <p>An explicit call to the <em>throw</em> statement is represented at the bytecode level with an <em>athrow</em> instruction.</p>
  
  <p>For instance, the code snippet below:</p>
  
  <pre><code>private static SQLException thrower() throws SQLException
  {
      throw new SQLException();
  }
  </code></pre>
  
  <p>Is translated into the following bytecode:</p>
  
  <pre><code>   private static java.sql.SQLException thrower()   throws java.sql.SQLException;
     Signature: ()Ljava/sql/SQLException;
     Code:
     0:   new #29; //class java/sql/SQLException
     3:   dup
     4:   invokespecial   #31; //Method java/sql/SQLException."&lt;init&gt;":()V
     7:   athrow
  </code></pre>
  
  <p>My question is: how do I know, by only analyzing the bytecode, the type of the exception being thrown? </p>
  
  <p>Obs.: It is worth mentioning that it is not always the case that we instantiate a new exception type when we call the <em>throw</em> statement in the source code. Thus, looking the type of the argument of the <em>new</em> instruction is not a solution.</p>