----- Original Message -----
From: "Peter Donald" <[EMAIL PROTECTED]>
To: "Ant Developers List" <[EMAIL PROTECTED]>
Sent: Monday, November 26, 2001 12:36 AM
Subject: Re: [PATCH] some diffs to ExecTask


> On Mon, 26 Nov 2001 19:22, Steve Loughran wrote:
> > > > and are happy with them.
> > > >
> > > > Apart from some tabs to spaces conversion , the two big changes here
> > > > are
> > > >
> > > > 1. you can specify a resultproperty that saves the result value into
an
> > > > (undefined) property. Obviously only of relevance if
failonerror=false
> > >

> Thats an option. Overall I am fairly unhappy with the current error
handling
> capabilities in Ant. Unfortunately I can not think of any graceful way of
> handling this without making Ant into a procedural language. How about you
?

Not really. I dont like checking for failures after every call. You can do
failure handling declaratively in Prolog, but for backtracking to work
properly you cant have any side effects. The alternative is some kind of
try/catch mechanim.

>
> The only thing I have thought about is being able to install a user
> configurable ErrorHandler but this seems to just punt the issues into the
> users lap.
>
> > While we are at it, I see someone has filed a feature req, for exec to
> > handle input from a file/property too. Again, some interesting use cases
> > could be covered here, especially related to a x-platform way of dealing
> > with apps that expect user input of some form or other.
>
> We don't do that already ? oh - lets add it ;)
>
> The one interesting thing about this will be whether or not we give the
> option to "filter" the property (ie replace file with correct file endings
as
> it is passed to task). Though I suppose this could be done as the step
before
> calling exec.

Looking at it more, I dont think java and exec should add so much stuff to
the tasks themselves. If we had some means of loading/saving a singlepropery
from/to a file (with binary/encoding) options, then you could do preamble
stuff like property expansion before feeding the data to the external
program:

 <propertyfileload name="inputdata" srcfile="somefile.txt" encoding="utf8"/>
 <propertyfilesave name="inputdata" destfile="temp/somefile.txt"
encoding="utf8"/>
 <exec input="temp/somefile.txt"  output="temp/outfile.txt" >
 <propertyfileload name="inputdata" srcfile="temp/outfile.txt"
encoding="utf8" expandproperties="false"/>

The end result would be that you dont need to have all those tasks that can
load/save both files and properties: if they pick one the other can be
derived.






--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to