Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Weaving Java Source Code - java.lang.StackOverflowError

Thanks for the response Ron - 

 

Yes I realize that this is in violation of the Sun user agreement, but this is nothing for production use just an in house debugging mechanism.  I want to try to handle errors in the most generic way without weaving all my source code.   I ran the following aspect against

 

StackOverflowError

Error

Throwable

 

Changing the target in each case.

 

aspect VirtualMachineErrorHandler {

    pintcut constructor(java.lang.Throwable t): execution(new(..)) && target(t);

 

   before(java.lang.Throwable t): ThrowableInitializer(t) {

   if (t instanceof java.lang.StackOverflowError) {

      //notify SO Error

   }

  

}

 

Only in the Throwable case do I get the callback, eventhough via my debugger I can see when the call reaches <init> Throwable the init is called on SOE, and Error as well.

 

I wasn’t sure if I was doing something wrong or if anyone had insight on this that it is a VM implementation issue?

 

Thanks

 

Jim


Back to the top