|
@@ -194,18 +194,16 @@ Procedure CatchUnhandledException (Obj : TObject; Addr: Pointer);
|
|
Var
|
|
Var
|
|
Message : String;
|
|
Message : String;
|
|
begin
|
|
begin
|
|
-{$ifndef USE_WINDOWS}
|
|
|
|
- Writeln ('An unhandled exception occurred at ',HexStr(Longint(Addr),8),' : ');
|
|
|
|
|
|
+ Writeln(stdout,'An unhandled exception occurred at ',HexStr(Longint(Addr),8),' :');
|
|
if Obj is exception then
|
|
if Obj is exception then
|
|
begin
|
|
begin
|
|
Message:=Exception(Obj).Message;
|
|
Message:=Exception(Obj).Message;
|
|
- Writeln (Message);
|
|
|
|
|
|
+ Writeln(stdout,Message);
|
|
end
|
|
end
|
|
else
|
|
else
|
|
- Writeln ('Exception object ',Obj.ClassName,' is not of class Exception.');
|
|
|
|
|
|
+ Writeln(stdout,'Exception object ',Obj.ClassName,' is not of class Exception.');
|
|
|
|
+ Writeln(stdout,'');
|
|
Halt(217);
|
|
Halt(217);
|
|
-{$else}
|
|
|
|
-{$endif}
|
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -261,7 +259,7 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
-Procedure AssertErrorHandler (Const Msg,FN : String;LineNo,TheAddr : Longint);
|
|
|
|
|
|
+Procedure AssertErrorHandler (Const Msg,FN : ShortString;LineNo,TheAddr : Longint);
|
|
Var
|
|
Var
|
|
S : String;
|
|
S : String;
|
|
begin
|
|
begin
|
|
@@ -325,20 +323,20 @@ var
|
|
begin
|
|
begin
|
|
if (P = nil) then
|
|
if (P = nil) then
|
|
begin
|
|
begin
|
|
- If NewSize>0 then
|
|
|
|
|
|
+ If NewSize>0 then
|
|
P := AllocMem(newSize)
|
|
P := AllocMem(newSize)
|
|
end
|
|
end
|
|
- else
|
|
|
|
|
|
+ else
|
|
begin
|
|
begin
|
|
- If NewSize>0 then
|
|
|
|
|
|
+ If NewSize>0 then
|
|
NewP := AllocMem(newSize)
|
|
NewP := AllocMem(newSize)
|
|
- else
|
|
|
|
|
|
+ else
|
|
NewP:=Nil;
|
|
NewP:=Nil;
|
|
if NewSize > currentSize then
|
|
if NewSize > currentSize then
|
|
NewSize := currentSize;
|
|
NewSize := currentSize;
|
|
- If NewSize>0 then
|
|
|
|
|
|
+ If NewSize>0 then
|
|
Move(P^, newP^, NewSize);
|
|
Move(P^, newP^, NewSize);
|
|
- If CurrentSize>0 then
|
|
|
|
|
|
+ If CurrentSize>0 then
|
|
FreeMem(P, currentSize);
|
|
FreeMem(P, currentSize);
|
|
P := newP;
|
|
P := newP;
|
|
end;
|
|
end;
|
|
@@ -356,7 +354,10 @@ Finalization
|
|
end.
|
|
end.
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.32 1999-09-15 20:26:30 florian
|
|
|
|
|
|
+ Revision 1.33 1999-10-26 12:29:07 peter
|
|
|
|
+ * assert handler must use shortstring
|
|
|
|
+
|
|
|
|
+ Revision 1.32 1999/09/15 20:26:30 florian
|
|
* patch from Sebastian Guenther applied: TMethod implementation
|
|
* patch from Sebastian Guenther applied: TMethod implementation
|
|
|
|
|
|
Revision 1.31 1999/08/28 14:53:27 florian
|
|
Revision 1.31 1999/08/28 14:53:27 florian
|