ソースを参照

* patch from Yury Sidorov to make simply exception handling without sysutils possible

git-svn-id: trunk@595 -
florian 20 年 前
コミット
25b79e9db3
2 ファイル変更9 行追加1 行削除
  1. 7 1
      rtl/inc/except.inc
  2. 2 0
      rtl/inc/system.inc

+ 7 - 1
rtl/inc/except.inc

@@ -166,7 +166,13 @@ begin
   If (ExceptProc<>Nil) and (ExceptObjectStack<>Nil) then
     with ExceptObjectStack^ do
       TExceptProc(ExceptProc)(FObject,Addr,FrameCount,Frames);
-  RunError(217);
+  if erroraddr = nil then
+    RunError(217)
+  else
+    if errorcode <= maxExitCode then
+      halt(errorcode)
+    else
+      halt(255)
 end;
 
 

+ 2 - 0
rtl/inc/system.inc

@@ -678,6 +678,8 @@ begin
   errorcode:=word(Errno);
   erroraddr:=addr;
   errorbase:=frame;
+  if ExceptAddrStack <> nil then
+    raise TObject(nil) at addr,frame;
   if errorcode <= maxExitCode then
     halt(errorcode)
   else