mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 09:07:59 +02:00
* On thread creation error, use a resourcestring message and textual representation of system error code.
- Removed an unused type declaration. git-svn-id: trunk@17164 -
This commit is contained in:
parent
f7dcad6f92
commit
2a303c88f5
@ -1,14 +1,5 @@
|
||||
{ Thread management routines }
|
||||
|
||||
type
|
||||
PRaiseFrame = ^TRaiseFrame;
|
||||
TRaiseFrame = record
|
||||
NextRaise: PRaiseFrame;
|
||||
ExceptAddr: Pointer;
|
||||
ExceptObject: TObject;
|
||||
ExceptionRecord: pointer; {PExceptionRecord}
|
||||
end;
|
||||
|
||||
constructor TThread.Create(CreateSuspended: Boolean;
|
||||
const StackSize: SizeUInt = DefaultStackSize);
|
||||
begin
|
||||
@ -20,7 +11,7 @@ begin
|
||||
FHandle := BeginThread(nil, StackSize, @ThreadProc, pointer(self), CREATE_SUSPENDED,
|
||||
FThreadID);
|
||||
if FHandle = TThreadID(0) then
|
||||
raise EThread.create('Failed to create new thread, code:'+inttostr(getlasterror));
|
||||
raise EThread.CreateFmt(SThreadCreateError, [SysErrorMessage(getlasterror)]);
|
||||
|
||||
FFatalException := nil;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user