* Defined ExceptionClass and ExceptObjProc for Delphi compatibility (bug 8459)

git-svn-id: trunk@7850 -
This commit is contained in:
michael 2007-06-29 20:16:44 +00:00
parent e002e6b9f4
commit 07fdede9b8
2 changed files with 5 additions and 1 deletions

View File

@ -40,6 +40,10 @@ unit objpas;
PPointerArray = ^PointerArray; PPointerArray = ^PointerArray;
TBoundArray = array of integer; TBoundArray = array of integer;
Var
ExceptionClass: TClass; { Exception base class (must actually be Exception, defined in sysutils ) }
ExceptObjProc: Pointer; { Used to convert OS exceptions to exceptions in Delphi. Unused in FPC}
{**************************************************************************** {****************************************************************************
Compatibility routines. Compatibility routines.
****************************************************************************} ****************************************************************************}
@ -94,7 +98,6 @@ unit objpas;
TResStringRec=AnsiString; TResStringRec=AnsiString;
Function LoadResString(p:PResStringRec):AnsiString; Function LoadResString(p:PResStringRec):AnsiString;
implementation implementation
{**************************************************************************** {****************************************************************************

View File

@ -358,6 +358,7 @@ Procedure InitExceptions;
(e.g: SIGSEGV -> ESegFault or so.) (e.g: SIGSEGV -> ESegFault or so.)
} }
begin begin
ExceptionClass := Exception;
ExceptProc:=@CatchUnhandledException; ExceptProc:=@CatchUnhandledException;
// Create objects that may have problems when there is no memory. // Create objects that may have problems when there is no memory.
OutOfMemory:=EOutOfMemory.Create(SOutOfMemory); OutOfMemory:=EOutOfMemory.Create(SOutOfMemory);