ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elizabeth Cooper <ecoo...@ergotech.com>
Subject thread death problem
Date Tue, 13 Sep 2005 21:34:37 GMT
There seem to many places in the code where there is a clause:

try {
   [...]
} catch (Throwable t) {
   [...]
}

This will cause many problems if t is a thread death.  From the JavaDocs 
for ThreadDeath:

"If ThreadDeath is caught by a method, it is important that it be rethrown 
so that the thread actually dies."

The way around this is to specifically catch "ThreadDeath" and rethrow it.

try {
   [...]
} catch (ThreadDeath td ) {
   throw td;
} catch ( Throwable t ) {
   [...]
}



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message