Browse Source

* Added 'RaiseProc': A user-definable callback procedure which gets
called whenever an exception is being raised

sg 25 years ago
parent
commit
9048ff6354
2 changed files with 13 additions and 2 deletions
  1. 7 1
      rtl/inc/except.inc
  2. 6 1
      rtl/inc/objpash.inc

+ 7 - 1
rtl/inc/except.inc

@@ -120,6 +120,8 @@ begin
   PushExceptObj(Obj,AnAddr,AFrame);
   If ExceptAddrStack=Nil then
     DoUnhandledException;
+  if (RaiseProc <> nil) and (ExceptObjectStack <> nil) then
+    RaiseProc(Obj, AnAddr, AFrame);
   longjmp(ExceptAddrStack^.Buf^,FPC_Exception);
 end;
 
@@ -244,7 +246,11 @@ begin
 end;
 {
   $Log$
-  Revision 1.2  2000-07-13 11:33:42  michael
+  Revision 1.3  2000-09-30 07:38:07  sg
+  * Added 'RaiseProc': A user-definable callback procedure which gets
+    called whenever an exception is being raised
+
+  Revision 1.2  2000/07/13 11:33:42  michael
   + removed logs
  
 }

+ 6 - 1
rtl/inc/objpash.inc

@@ -137,6 +137,7 @@
 
        Const
           ExceptProc : TExceptProc = Nil;
+	  RaiseProc : TExceptProc = Nil;
 
        Function RaiseList : PExceptObject;
 
@@ -211,7 +212,11 @@
        end;
 {
   $Log$
-  Revision 1.3  2000-07-14 10:33:10  michael
+  Revision 1.4  2000-09-30 07:38:07  sg
+  * Added 'RaiseProc': A user-definable callback procedure which gets
+    called whenever an exception is being raised
+
+  Revision 1.3  2000/07/14 10:33:10  michael
   + Conditionals fixed
 
   Revision 1.2  2000/07/13 11:33:45  michael