Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Exception AspectJ AOP:after,当方法抛出excation时_Exception_Aspectj - Fatal编程技术网

Exception AspectJ AOP:after,当方法抛出excation时

Exception AspectJ AOP:after,当方法抛出excation时,exception,aspectj,Exception,Aspectj,我已经在某个方法上定义了方面,它应该在方法端被“激活”: <aop:aspect id="HandlerClass" ref="handlerClass"> <aop:after pointcut = "execution(* MyClass.myMethod(String, String, boolean))" method = "handlerMethod" ></aop:after> 问题是在MyClass.myMethod

我已经在某个方法上定义了方面,它应该在方法端被“激活”:

    <aop:aspect id="HandlerClass" ref="handlerClass">
    <aop:after pointcut = "execution(* MyClass.myMethod(String, String, boolean))"
    method = "handlerMethod" ></aop:after>

问题是在MyClass.myMethod之后,方面不起作用。 在调试时,我注意到myMethod抛出了一个异常。
问题是:这是预期的行为吗?我的意思是,当MyClass.myMethod引发异常时,是否也应该调用handlerClass.handlerMethod?

您需要使用后面的建议。有关更多信息,请参阅