Don't know about UNIX but on Windows it seems that the return code is always 0.
Regards
Con
-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
Sent: Monday, June 17, 2002 08:23
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: error handling
You're right. The command line wrapper can and probably should delete
the target file in case of an error. Could you check if the return code
is set on the command line? If not, we should fix that.
It is. The problem is that FOP can't delete the output file
in case of a
problem if it only gets an OutputStream. And for
optimization reasons
FOP can't wait until the end to write the output to the
target stream.
But does fop should delete output file? I don't think so, that's
responsibility of enclosing application, which has full control of
OutputStream and can easily do this being catching FOPException.
All very well for embeddding, but the command prompt version still leaves
the corrupt file there no file at all would be preferable to a useless
one.
I hope the UNIX script sets the return code on errors (haven't tested yet).
Cheers,
Jeremias Märki