Generic call inside a except clause thows error: illegal expresion
Original Reporter info from Mantis: fravemel
-
Reporter name: fravemel
Original Reporter info from Mantis: fravemel
- Reporter name: fravemel
Description:
var
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 reproduce:
Open attached project and compile.
Mantis conversion info:
- Mantis ID: 37999
- OS: Windows
- OS Build: 10
- Platform: Win32 y Win64
- Version: 3.2.0
- Monitored by: » fravemel (fravemel)