Browse Source

* fpAsync: Exception within main loop are now caught correctly, so that
external applications can handle them and restart the main loop

git-svn-id: trunk@713 -

sg 20 years ago
parent
commit
e0488e169b
1 changed files with 8 additions and 8 deletions
  1. 8 8
      fcl/inc/fpasync.pp

+ 8 - 8
fcl/inc/fpasync.pp

@@ -1,7 +1,7 @@
 {
 {
 
 
     fpAsync: Asynchronous event management for Free Pascal
     fpAsync: Asynchronous event management for Free Pascal
-    Copyright (C) 2001-2003 by
+    Copyright (C) 2001-2005 by
       Areca Systems GmbH / Sebastian Guenther, [email protected]
       Areca Systems GmbH / Sebastian Guenther, [email protected]
 
 
     See the file COPYING.FPC, included in this distribution,
     See the file COPYING.FPC, included in this distribution,
@@ -548,18 +548,18 @@ begin
         LastEndOfLine := i + 1;
         LastEndOfLine := i + 1;
 
 
         if Assigned(FOnLine) then
         if Assigned(FOnLine) then
-        begin
+	begin
           FBuffer := RealBuffer + LastEndOfLine;
           FBuffer := RealBuffer + LastEndOfLine;
           FBytesInBuffer := CurBytesInBuffer - LastEndOfLine;
           FBytesInBuffer := CurBytesInBuffer - LastEndOfLine;
-          InCallback := True;
-          try
+	  InCallback := True;
+	  try
             FOnLine(line);
             FOnLine(line);
-          finally
-            InCallback := False;
-          end;
+	  finally
+	    InCallback := False;
+	  end;
           // Check if <this> has been destroyed by FOnLine:
           // Check if <this> has been destroyed by FOnLine:
           if DoStopAndFree then
           if DoStopAndFree then
-            exit;
+	    exit;
         end;
         end;
       end;
       end;
       Inc(i);
       Inc(i);