@ AfterThrowing ( pointcut = "execution(* org.apache.cassandra.thrift.CassandraServer.doInsert(..))" , throwing = "throwable" ) public void logErrorFromThrownException ( final JoinPoint joinPoint , final Throwable throwable ) { final String className = joinPoint . getTarget ( ) . getClass ( ) . getName ( ) ; final String methodName = joinPoint . getSignature ( ) . getName ( ) ; logger . error ( "Could not write to cassandra! Method: " + className + "." + methodName + "()" , throwable ) ; }
Logs an error message for unhandled exception thrown from the target method .