From c032cd36e8261adbf990b67bf60ed94a904db35d Mon Sep 17 00:00:00 2001 From: marco Date: Sat, 3 Jan 2004 09:20:45 +0000 Subject: [PATCH] * errorhandling fixed --- compiler/utils/fpc.pp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/compiler/utils/fpc.pp b/compiler/utils/fpc.pp index 4a6096f552..2260e19e30 100644 --- a/compiler/utils/fpc.pp +++ b/compiler/utils/fpc.pp @@ -94,6 +94,7 @@ program fpc; processorstr : string; ppccommandline : ansistring; i : longint; + errorvalue : Longint; begin ppccommandline:=''; {$ifdef i386} @@ -165,18 +166,22 @@ program fpc; { call ppcXXX } swapvectors; {$ifdef unix} - SysUtils.exec(ppcbin,ppccommandline); + errorvalue:=SysUtils.exec(ppcbin,ppccommandline); {$else} Dos.exec(ppcbin,ppccommandline); + errorvalue:=doserror; {$endif} swapvectors; - if doserror<>0 then + if errorvalue<>0 then error(ppcbin+' can''t be executed'); halt(dosexitcode); end. { $Log$ - Revision 1.9 2004-01-03 09:12:23 marco + Revision 1.10 2004-01-03 09:20:45 marco + * errorhandling fixed + + Revision 1.9 2004/01/03 09:12:23 marco * unix does ansistring exec Revision 1.8 2003/10/08 19:16:50 peter