[Tilesathome] catching ERRORLEVEL in Windows batch
Carsten Moeller
cmindividual at gmx.de
Wed Sep 3 11:00:10 BST 2008
Dirk-Lüder Kreie schrieb:
> Carsten Moeller schrieb:
>> Hi,
>>
>> sometimes I don't run t at h in a loop, instead
>> I use a batch files that does the work, calling
>> tilesGen and tilesGen upload.
>> But if tilesGen fails in some way I do not
>> always get an exit code != 0
>>
>> Can we change this behaviour?
>>
>> e.g.
>>
>> ...
>> Revision 10440.
>> downloaded 10 bytes
>> [#0 0% ] tilesGen.pl has changed. Please restart new version.
>>
>> Results in "EROORLEVEL=0" = success!
>
> Strictly speaking that is not a failure, because the program did what it
> should correctly. From the Standpoint of someone expecting a result (as
> in a generated tileset, or completed upload), it is a failure.
>
> So I think the client should automatically do what it was originally
> called to do at that point instead of exiting.
>
Yes, in this case this is not really an error.
But I remember other situations where it can be enterpreted as an error.
e.g. Download failure etc.
I don't want to blame Microsoft for the variable name "ERRORLEVEL" cause
it is rather historical, but it is the only way to catch a program's
exit code in a batch.
Regards
Carsten
More information about the Tilesathome
mailing list