ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martijn Kruithof>
Subject Re: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/compilers
Date Tue, 24 May 2005 17:59:37 GMT
Steve Loughran wrote:

> wrote:
>> jkf         2005/05/23 14:52:35
>>   Modified:    src/main/org/apache/tools/ant/taskdefs/email 
>>                src/main/org/apache/tools/ant
>>                src/main/org/apache/tools/ant/taskdefs/optional/javah
>>                src/main/org/apache/tools/ant/listener
>>                src/main/org/apache/tools/ant/taskdefs/optional/script
>>                src/main/org/apache/tools/ant/util
>>                src/main/org/apache/tools/ant/taskdefs/rmic
>> src/main/org/apache/tools/ant/taskdefs/optional/native2ascii
>>                src/main/org/apache/tools/ant/util/regexp
>>                src/main/org/apache/tools/ant/taskdefs/compilers
>>   Log:
>>   Improved the newInstance method in ClasspathUtils, and used this 
>> method from
>>   the places where newInstances are made and Throwable is caught.
> nice bit of refactoring.
> Does this change how the ProjectHelper diagnostics stuff works, or is 
> that self-contained enough to be unaffected.

Unless some unexpected throwable (unexpected RuntimeException or Error) 
was actually thrown while creating the class, nothing outside the 
changed scope should notice anything (apart from some error strings in 
output in case the class could not be created). For this even the 
LinkageError is considered expected in this situation. (Wherever a 
buildexception was thrown, a buildexeception is still thrown, in case of 
logging still only logging applies.)
If for instance an VirtualMachineError / ThreadDeath occurs however 
things may go different.  (If no layer above catches the Error though.) 
Ideally those would leak all the way up, at least when thrown so that 
appropriate action can be taken by the VM (in case of a 
VirualMachineError exit, printing an error report).

Currently those errors are sometime caught and converted to 
buildexceptions (Sometimes making clear OutOfMemoryErrors  
incomprehensible (e.g. 25086)) And sometimes not (e.g. 34342)

See also discussion in 32941 (only party solved).

So currently I am looking into getting as many catch Throwables out as 
possible, in small steps.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message