]> source.dussan.org Git - aspectj.git/commitdiff
dump the problem in the case when we are about to abort...
authoraclement <aclement>
Wed, 18 May 2005 12:46:27 +0000 (12:46 +0000)
committeraclement <aclement>
Wed, 18 May 2005 12:46:27 +0000 (12:46 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/WeaverMessageHandler.java

index d703886050e5a2d4d293662e9b6eafb10c2a1eec..d44ce2ed6785c53bec5ace439c22992974d45b71 100644 (file)
@@ -96,7 +96,7 @@ public class WeaverMessageHandler implements IMessageHandler {
                                                                endPos,
                                                                sLoc != null ? sLoc.getLine() : 0
                                                                );
-               IProblem[] seeAlso = buildSeeAlsoProblems(message.getExtraSourceLocations(),
+               IProblem[] seeAlso = buildSeeAlsoProblems(problem,message.getExtraSourceLocations(),
                                                                                                  problemSource,        
                                                                                                  usedBinarySourceFileName);
                problem.setSeeAlsoProblems(seeAlso);
@@ -179,7 +179,7 @@ public class WeaverMessageHandler implements IMessageHandler {
                return context;
        }
        
-       private IProblem[] buildSeeAlsoProblems(List sourceLocations,
+       private IProblem[] buildSeeAlsoProblems(IProblem originalProblem,List sourceLocations,
                                                                                        CompilationResult problemSource,
                                                                                        boolean usedBinarySourceFileName) {
                List ret = new ArrayList();
@@ -198,6 +198,8 @@ public class WeaverMessageHandler implements IMessageHandler {
                                                                                loc.getLine());
                          ret.add(dp);
                        } else {
+                               System.err.println("About to abort due to null location, dumping state:");
+                               System.err.println("> Original Problem="+problemSource.toString());
                                throw new RuntimeException("Internal Compiler Error: Unexpected null source location passed as 'see also' location.");
                        }
                }