summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoraclement <aclement>2006-05-15 12:28:27 +0000
committeraclement <aclement>2006-05-15 12:28:27 +0000
commit5c2da6f738945e027241703ef91c49099d9851d8 (patch)
treed671427d18ab6ecefab7c22d37fe379e0c1bfef8 /weaver
parentce56cd98bd5fdb99b24f1d57453470416bcd35d6 (diff)
downloadaspectj-5c2da6f738945e027241703ef91c49099d9851d8.tar.gz
aspectj-5c2da6f738945e027241703ef91c49099d9851d8.zip
recover from crash whilst crashing...
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
index aa043700b..8c1667be5 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
@@ -1581,12 +1581,26 @@ public class BcelWeaver implements IWeaver {
return clazz;
}
} catch (RuntimeException re) {
- String messageText = "trouble in: \n" + clazz.toLongString();
+ String classDebugInfo = null;
+ try {
+ classDebugInfo = clazz.toLongString();
+ } catch (Exception e) {
+ // recover from crash whilst producing debug string
+ classDebugInfo = clazz.getClassName();
+ }
+ String messageText = "trouble in: \n" + classDebugInfo;
getWorld().getMessageHandler().handleMessage(
new Message(messageText,IMessage.ABORT,re,null)
);
} catch (Error re) {
- String messageText = "trouble in: \n" + clazz.toLongString();
+ String classDebugInfo = null;
+ try {
+ classDebugInfo = clazz.toLongString();
+ } catch (Exception e) {
+ // recover from crash whilst producing debug string
+ classDebugInfo = clazz.getClassName();
+ }
+ String messageText = "trouble in: \n" + classDebugInfo;
getWorld().getMessageHandler().handleMessage(
new Message(messageText,IMessage.ABORT,re,null)
);