title: How to intercept method which handles its own exceptions using AspectJ
body: <p>I'm trying add some monitoring when some specific exception occurs. 
  For example, if I have an aspect like this:</p>
  
  <pre><code>@Aspect
  public class LogAspect {
  
    @AfterThrowing(value = "execution(* *(..))", throwing = "e")
    public void log(JoinPoint joinPoint, Throwable e){
      System.out.println("Some logging stuff");
    }
  }
  </code></pre>
  
  <p>And test class:</p>
  
  <pre><code> public class Example {
  
  
    public void divideByZeroWithCatch(){
      try{
        int a = 5/0;
      }
      catch (ArithmeticException e){
        System.out.println("Can not divide by zero");
      }
    }
  
    public void divideByZeroWithNoCatch(){
      int b = 5/0;
    }
  
    public static void main (String [] args){
      Example e = new Example();
      System.out.println("***** Calling method with catch block *****");
      e.divideByZeroWithCatch();
      System.out.println("***** Calling method without catch block *****");
      e.divideByZeroWithNoCatch();
    }
  }
  </code></pre>
  
  <p>As an output i will get:</p>
  
  <pre><code>***** Calling method with catch block *****
  Can not divide by zero
  ***** Calling method without catch block *****
  Some logging stuff
  </code></pre>
  
  <p>I was wondering if there is way for me to intercept method execution just after throwing exception, do something in my advice and continue with executing code in corresponding  catch block?
  So that if i call <code>divideByZeroWithCatch()</code>i can get:</p>
  
  <pre><code>Some logging stuff
  Can not divide by zero 
  </code></pre>