title: Aspectj "after throwing" - monitor a specific exception
body: <p>I'm trying to catch all <strong>MySpecificException</strong> exceptions thrown from an application code via aspectj. </p>
  
  <p>There are lots of places where this exception can be thrown.
  Once the exception is thrown I want to log it or do some operation (regardless if it was caught later or not).</p>
  
  <p>I've tried using:</p>
  
  <pre><code>@AfterThrowing(value = "(execution(* *.*(..))), throwing = "throwable")
  </code></pre>
  
  <p>but this is an <strong>overkill</strong> since it catches all the exceptions. I can filter manually later, but I'm trying to avoid this (due to my apps nature, it causes load time problems in some cases due to class loader issues)</p>
  
  <p>I've also tried:</p>
  
  <pre><code>@AfterThrowing(value = "(execution(* *.*(..))) throws MySpecificException, throwing = "throwable")
  </code></pre>
  
  <p>but it's <strong>not enough</strong> since what if the method declares that it throws lots of exceptions?</p>
  
  <p>Any suggestions on how to catch only my relevant exceptions without filtering them inside the pointcut implementation?</p>
  
  <p>Thanks </p>