ant-dev mailing list archives

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

> jkf@apache.org wrote:
>
>> jkf         2005/05/23 14:52:35
>>
>>   Modified:    src/main/org/apache/tools/ant/taskdefs/email 
>> EmailTask.java
>>                src/main/org/apache/tools/ant Main.java
>>                src/main/org/apache/tools/ant/taskdefs/optional/javah
>>                         JavahAdapterFactory.java
>>                src/main/org/apache/tools/ant/listener MailLogger.java
>>                src/main/org/apache/tools/ant/taskdefs/optional/script
>>                         ScriptDef.java
>>                src/main/org/apache/tools/ant/util ClasspathUtils.java
>>                src/main/org/apache/tools/ant/taskdefs/rmic
>>                         RmicAdapterFactory.java
>>                
>> src/main/org/apache/tools/ant/taskdefs/optional/native2ascii
>>                         Native2AsciiAdapterFactory.java
>>                src/main/org/apache/tools/ant/util/regexp
>>                         RegexpMatcherFactory.java
>>                src/main/org/apache/tools/ant/taskdefs/compilers
>>                         CompilerAdapterFactory.java
>>   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.

Martijn

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


Mime
View raw message