]> source.dussan.org Git - aspectj.git/commitdiff
better error for unsupported 'if' lexically inside cflow
authorjhugunin <jhugunin>
Wed, 1 Jan 2003 01:32:20 +0000 (01:32 +0000)
committerjhugunin <jhugunin>
Wed, 1 Jan 2003 01:32:20 +0000 (01:32 +0000)
weaver/src/org/aspectj/weaver/patterns/IfPointcut.java

index 8ef64b0a01ce8bae8507d42d7b0fdeb345f34f35..868504ae017d8e88a473ea9b5179629f0f204d0f 100644 (file)
@@ -19,6 +19,7 @@ import java.util.List;
 
 import org.aspectj.weaver.*;
 import org.aspectj.weaver.ast.*;
+import org.aspectj.bridge.*;
 import org.aspectj.bridge.MessageUtil;
 import org.aspectj.util.*;
 
@@ -131,9 +132,9 @@ public class IfPointcut extends Pointcut {
                } else {
                        ResolvedPointcutDefinition def = bindings.peekEnclosingDefinitition();
                        if (def == CflowPointcut.CFLOW_MARKER) {
-                               inAspect.getWorld().getMessageHandler().handleMessage(
-                                   MessageUtil.error("if not supported lexically within cflow (compiler limitation)",
-                                                                       null));
+                               inAspect.getWorld().showMessage(IMessage.ERROR,
+                                       "if not supported lexically within cflow (compiler limitation)",
+                                       getSourceLocation(), null);
                                return Pointcut.makeMatchesNothing(Pointcut.CONCRETE);
                        }
                        ret.baseArgsCount = def.getParameterTypes().length;