title: Redirecting to Site whenever any AfterThrowing Aspect is called
body: <p>i am written one aspect i want whenever this is called  or any exception occurs , we redirect this to <a href="http://google.com" rel="nofollow noreferrer">http://google.com</a></p>
  
  <pre class="lang-java prettyprint-override"><code>@AfterThrowing(pointcut = "execution(* com.ts.templateService.*.*(..))", throwing = "e")
  public void LocalAfterThrowing(JoinPoint joinPoint, Throwable e) {
  
      Signature signature = joinPoint.getSignature();
      String methodName = signature.getName();
      String stuff = signature.toString();
      String arguments = Arrays.toString(joinPoint.getArgs());
      System.out.println("Got Exception in the Method: "
              + methodName + " with arguments "
              + arguments + "\nand the full toString: " + stuff + "\nthe exception is: "
              + e.getMessage());
  }
  </code></pre>