From e7ac54fae25b797a0d3609350a27330bea302fb9 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 7 Apr 2004 09:07:43 +0000 Subject: [PATCH] Fix for Bugzilla Bug 57430 exception printing --- .../ajdt/internal/compiler/AjCompilerAdapter.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/AjCompilerAdapter.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/AjCompilerAdapter.java index 8bb0a7c83..d8eb8fbdb 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/AjCompilerAdapter.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/AjCompilerAdapter.java @@ -116,7 +116,14 @@ public class AjCompilerAdapter implements ICompilerAdapter { } catch (IOException ex) { AbortCompilation ac = new AbortCompilation(null,ex); throw ac; - } + } catch (RuntimeException rEx) { + if (rEx instanceof AbortCompilation) throw rEx; // Don't wrap AbortCompilation exceptions! + + // This will be unwrapped in Compiler.handleInternalException() and the nested + // RuntimeException thrown back to the original caller - which is AspectJ + // which will then then log it as a compiler problem. + throw new AbortCompilation(true,rEx); + } } public void beforeProcessing(CompilationUnitDeclaration unit) { -- 2.39.5