2 Replies Latest reply on Oct 25, 2011 10:34 AM by Tom Jenkinson

    Throwing an error out of a byteman rule

    Tom Jenkinson Master

      I was trying to neutralize a thread using Byteman but unfortunately/fortunately the way Thread is written these days this is not so simple. The ThreadDeath raised by my rule by calling Thread.stop() (there is byteman specific way to do this killThread but that has the same issue) is handled by my code which is resilient and as such it catches RuntimeExceptions, it doesn't handle Errors though (due to domain specific justification).


      Therefore I figured, OK,  I will throw an Error in my rule to neutralize this thread.


      Unfortunately byteman does not allow throwing *undeclared* Errors out of the target method of a rule.


      I have therefore raised: https://issues.jboss.org/browse/BYTEMAN-175


      If you need the functionality, please vote