diff options
author | aclement <aclement> | 2006-05-15 12:28:27 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-05-15 12:28:27 +0000 |
commit | 5c2da6f738945e027241703ef91c49099d9851d8 (patch) | |
tree | d671427d18ab6ecefab7c22d37fe379e0c1bfef8 /weaver | |
parent | ce56cd98bd5fdb99b24f1d57453470416bcd35d6 (diff) | |
download | aspectj-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.java | 18 |
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) ); |