この状況ではなく、なぜアドバイス@After
が適用されるのか理解できません。@AfterThrowing
@Pointcut("execution(* componentB.Bye.run())")
public void newThread(){
}
@After("newThread()")
public void cokolwiek2(JoinPoint joinPoint){
report(joinPoint);
}
@AfterThrowing(pointcut="newThread()",throwing="e")
public void itsAFoo(JoinPoint joinPoint, RemoteException e) {
logger.error(joinPoint.getSignature().toLongString() + " exception here!");
}
私は例外がスローされると確信しています:
public String greeting(String c) throws RemoteException,
InterruptedException {
throw new RemoteException();
//return "Good morning!";
}
しかし、ログはありませんexception here!