aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/src
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2004-01-14 15:24:06 +0000
committerjhugunin <jhugunin>2004-01-14 15:24:06 +0000
commit5834de97836ebcc056415736c17c46e8b1dfaf5a (patch)
treea7b87ccc35e25aafe73d24d17f08cc33f62b22c4 /runtime/src
parent7bbd1f419239dc9e8b46e7fd912b2bc007bbd76a (diff)
downloadaspectj-5834de97836ebcc056415736c17c46e8b1dfaf5a.tar.gz
aspectj-5834de97836ebcc056415736c17c46e8b1dfaf5a.zip
Fix for Bugzilla Bug 44587
Erroneous exception conversion and Bugzilla Bug 34206 before():execution(new(..)) does not throw NoAspectBoundException All exceptions that occur during the static intialization of a persingleton aspect will be swallowed. When using that aspect (via aspectOf()) a NoAspectBoundException will be thrown with the original exception from the staitc initializer as the cause.
Diffstat (limited to 'runtime/src')
-rw-r--r--runtime/src/org/aspectj/lang/NoAspectBoundException.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/src/org/aspectj/lang/NoAspectBoundException.java b/runtime/src/org/aspectj/lang/NoAspectBoundException.java
index 4bebcfb47..b21d3895c 100644
--- a/runtime/src/org/aspectj/lang/NoAspectBoundException.java
+++ b/runtime/src/org/aspectj/lang/NoAspectBoundException.java
@@ -18,4 +18,16 @@ package org.aspectj.lang;
* when there is no aspect of that type currently bound.
*/
public class NoAspectBoundException extends RuntimeException {
+ Throwable cause;
+ public NoAspectBoundException(String aspectName, Throwable inner) {
+ super(inner == null ? aspectName :
+ "Exception while initializing " +aspectName + ": " +inner);
+ this.cause = inner;
+ }
+
+ public NoAspectBoundException() {
+ }
+
+ public Throwable getCause() { return cause; }
+
}