Skip to content

within a unit, an inline method with a try except block accessing an exception object will cause internal error 200602035

Original Reporter info from Mantis: denpoon
  • Reporter name: Dennis Poon

Description:

It is similar to an bug 18967.

Steps to reproduce:

create a project:

program ErrorSample;
{$mode objfpc}{$H+}
uses
    {$IFDEF UNIX}
    cThreads,
    {$ENDIF}
  Classes,
  ulcproxy;
begin
end.         

create a unit:

unit uLCProxy;
{$MODE objfpc}{$H+}
interface
uses
  Classes,sysutils;
type
  TParseForwardInputThread = class(TThread)
  protected
    procedure ProcessDiagMsg; inline;   //causing internal error
  public
  end;
implementation
procedure TParseForwardInputThread.ProcessDiagMsg;
var msg : string;
begin
//***** this is the block causing internal error
      try
      except
        on E: exception do begin
          msg := E.Message;
        end;
      end;
end;
end.   

Additional information:

this problem exists in both windows and linux version.

Mantis conversion info:

  • Mantis ID: 24801
  • OS: Windows,Ubuntu
  • OS Build: Winxp,Ubuntu1304
  • Build: 2013-03-17
  • Platform: x86,ARM
  • Version: 2.6.2
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information