Browse Source

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

git-svn-id: trunk@7850 -
michael 18 years ago
parent
commit
07fdede9b8
2 changed files with 5 additions and 1 deletions
  1. 4 1
      rtl/objpas/objpas.pp
  2. 1 0
      rtl/objpas/sysutils/sysutils.inc

+ 4 - 1
rtl/objpas/objpas.pp

@@ -40,6 +40,10 @@ unit objpas;
        PPointerArray = ^PointerArray;
        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.
 ****************************************************************************}
@@ -94,7 +98,6 @@ unit objpas;
      TResStringRec=AnsiString;
    Function LoadResString(p:PResStringRec):AnsiString;
 
-
   implementation
 
 {****************************************************************************

+ 1 - 0
rtl/objpas/sysutils/sysutils.inc

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