Re-throw an exception in @Around Aspect

Viewed 6650

Is it normal to re-throw, after some action, an exception from around aspect to ExceptionHandler in rest controller, like this:

@Around("execution(* *(..)) && @annotation(someAnnotation)")
public Object catchMethod(ProceedingJoinPoint point, SomeAnnotation someAnnotation) throws Throwable {
  //some action
    try {
        result = point.proceed();
    } catch (Exception e) {
        //some action
        throw e; //can I do this?
    }
     //some action
    return result;
}

It's work but I don't know maybe I haven't to do this for some reason.

1 Answers
Related