[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Getting compilation error on a simple aspect
|
Hi,
Getting compilation error on simple aspect (using Aspectj 1.1 beta);
Log.aj:24: Synta
x error on token "throwing", "++", "--" expected
after() throwing (Exception e): visitCall() {
^^^^^^^^
Aspect is as follows
aspect Log {
pointcut visitCall():execution(* visit(..));
static void println(String msg){
System.out.println(msg);
}
static private void printParameters(JoinPoint jp) {
println("Arguments: " );
Object[] args = jp.getArgs();
String[] names = ((CodeSignature)jp.getSignature()).getParameterNames();
Class[] types = ((CodeSignature)jp.getSignature()).getParameterTypes();
for (int i = 0; i < args.length; i++) {
println(" " + i + ". " + names[i] +
" : " + types[i].getName() +
" = " + args[i]);
}
after() throwing (Exception e): visitCall() {
printParameters(thisJoinPoint);
}
}
}
Whats wrong?
Thanks in advance for help
Unmesh
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day