+ Changed Exception to EProcess

git-svn-id: trunk@2923 -
This commit is contained in:
michael 2006-03-15 12:31:50 +00:00
parent c575771aee
commit 7f5b9e5c00
4 changed files with 7 additions and 5 deletions

View File

@ -130,6 +130,8 @@ Type
Property WindowWidth : Cardinal Read dwXSize Write SetWindowWidth;
Property FillAttribute : Cardinal read FFillAttribute Write FFillAttribute;
end;
EProcess = Class(Exception);
implementation

View File

@ -139,7 +139,7 @@ begin
if (P.ApplicationName='') then
begin
If (P.CommandLine='') then
Raise Exception.Create(SNoCommandline);
Raise EProcess.Create(SNoCommandline);
Cmd:=P.CommandLine;
end
else
@ -204,7 +204,7 @@ Procedure CreatePipes(Var HI,HO,HE : TPipePair; CE : Boolean);
begin
If not CreatePipeHandles(P[peRead],P[peWrite]) then
Raise Exception.Create('Failed to create pipes');
Raise EProcess.Create('Failed to create pipes');
end;
Procedure ClosePair(Var P : TPipePair);
@ -268,7 +268,7 @@ begin
PName:=FileSearch(Pname,fpgetenv('PATH'));
Pid:=fpfork;
if Pid<0 then
Raise Exception.Create('Failed to Fork process');
Raise EProcess.Create('Failed to Fork process');
if (PID>0) then
begin
// Parent process. Copy process information.

View File

@ -202,7 +202,7 @@ begin
If Not CreateProcess (PName,PCommandLine,@FProcessAttributes,@FThreadAttributes,
FInheritHandles,FCreationFlags,FEnv,PDir,FStartupInfo,
fProcessInformation) then
Raise Exception.CreateFmt('Failed to execute %s : %d',[FCommandLine,GetLastError]);
Raise EProcess.CreateFmt('Failed to execute %s : %d',[FCommandLine,GetLastError]);
FProcessHandle:=FProcessInformation.hProcess;
FThreadHandle:=FProcessInformation.hThread;
FProcessID:=FProcessINformation.dwProcessID;

View File

@ -202,7 +202,7 @@ begin
If Not CreateProcess (PName,PCommandLine,@FProcessAttributes,@FThreadAttributes,
FInheritHandles,FCreationFlags,FEnv,PDir,@FStartupInfo,
fProcessInformation) then
Raise Exception.CreateFmt('Failed to execute %s : %d',[FCommandLine,GetLastError]);
Raise EProcess.CreateFmt('Failed to execute %s : %d',[FCommandLine,GetLastError]);
FProcessHandle:=FProcessInformation.hProcess;
FThreadHandle:=FProcessInformation.hThread;
FProcessID:=FProcessINformation.dwProcessID;