Yury Sidorov wrote: > Hello, > > I found that try...except and try...finally do not work if SysUtils unit is > not used (exception handling code is not called). > The following patch fixes this issue.
Not using sysutils means that you don't want exceptions. If you want to have run time errors converted into exceptions use sysutils. The patch has another probably undesired side effect: imaging someone installed an own errorproc to release resources (memory etc.) if he did so, he won't get that exception. > > > Index: system.inc > =================================================================== > --- system.inc (revision 594) > +++ system.inc (working copy) > @@ -674,7 +674,10 @@ > Procedure HandleErrorAddrFrame (Errno : longint;addr,frame : > Pointer);[public,alias:'FPC_BREAK_ERROR']; > begin > If pointer(ErrorProc)<>Nil then > - ErrorProc(Errno,addr,frame); > + ErrorProc(Errno,addr,frame) > + else > + if frame <> nil then > + raise TObject(nil) at addr,frame; > errorcode:=word(Errno); > erroraddr:=addr; > errorbase:=frame; > > > By the way, messages with attachment are not posted to mailing list. Is > it ok? > > Yury Sidorov, [EMAIL PROTECTED] > > > > _______________________________________________ > fpc-devel maillist - fpc-devel@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-devel _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel