I do not understand how the contents of another file may introduce
syntax errors in a Jython script. Can you give an example syntax error,
together with the properties file that triggers it?
Use sys.exit to return a fail code. Look into the unittest module for
good examples.
Regards,
RR
> -----Original Message-----
> From: jython-users-admin@...
> [mailto:jython-users-admin@...] On Behalf
> Of Satya Ghattu
> Sent: Saturday, September 25, 2004 7:12 PM
> To: jython-users@...
> Subject: [Jython-users] catching syntax errors
>
>
> Hi,
>
> When there are syntax errors in a jython script, the calling program
> will get no information about this.
>
> In our case the calling program is ANT. If the user enters invalid
> properties it could cause syntax errors in the script. But
> the ANT task
> always receive a successfull code back and doesn't know that
> it went wrong.
>
> What is the workaround for this? How can I from jython
> script return a
> fail code so that ANT does not continue?
>
> thanks
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one
> of 170 Project Admins to receive an Apple iPod Mini FREE for
> your judgement on who ports your project to Linux PPC the
> best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> _______________________________________________
> Jython-users mailing list
> Jython-users@...
> https://lists.sourceforge.net/lists/listinfo/jython-users
>
|