View Issue Details

IDProjectCategoryView StatusLast Update
0037999FPCCompilerpublic2020-10-28 07:45
Reporterfravemel Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
PlatformWin32 y Win64OSWindows 
Product Version3.2.0 
Summary0037999: Generic call inside a except clause thows error: illegal expresion
Descriptionvar
  Respuesta: TJSONObject;
begin
try
  Respuesta := TJSONObject.Create(['Respuesta','pong']);
  Res.Send<TJSONObject>(Respuesta.Clone as TJSONObject);//----this runs ok----
  if Assigned(Respuesta) then Respuesta.Free;

except on e: Exception do begin
  Respuesta := TJSONObject.Create(['Error',e.Message]);
  Res.Send<TJSONObject>(Respuesta.Clone as TJSONObject);//----this trows an the exception but the same code outsite Except compiles OK---
  if Assigned(Respuesta) then Respuesta.Free;
end;
Steps To ReproduceOpen attached project and compile.
Tagsexcept, expresion, illegal, try
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Activities

fravemel

2020-10-27 23:24

reporter  

PruebaExceptionGeneric.7z (819,787 bytes)

fravemel

2020-10-27 23:27

reporter   ~0126591

It doesnt trows an exception, but gives a comipiler error
Compile Project, Target: project1.exe: Exit code 1, Errors: 2
project1.lpr(26,24) Error: Illegal expression
project1.lpr(26,24) Error: Internal error 2015091801

fravemel

2020-10-28 07:45

reporter   ~0126600

compiled with Lazarus 2.0.10 r63526 FPC 3.2.0 x86_64-win64-win32/win64
and
Lazarus 2.0.10 r63526 FPC 3.2.0 x86_64-win64-win32/win64

Issue History

Date Modified Username Field Change
2020-10-27 23:24 fravemel New Issue
2020-10-27 23:24 fravemel File Added: PruebaExceptionGeneric.7z
2020-10-27 23:27 fravemel Note Added: 0126591
2020-10-27 23:28 fravemel Tag Attached: {illegal
2020-10-27 23:28 fravemel Tag Attached: expresion
2020-10-27 23:28 fravemel Tag Attached: try
2020-10-27 23:28 fravemel Tag Attached: except}
2020-10-27 23:29 fravemel Tag Detached: except}
2020-10-27 23:29 fravemel Tag Detached: {illegal
2020-10-27 23:29 fravemel Tag Attached: illegal
2020-10-27 23:29 fravemel Tag Attached: except
2020-10-28 07:45 fravemel Note Added: 0126600