Hello,
The following code does not show any exception here, but I would expect this to happen.
Any ideas?
me@debian:~/Documents/dev$ fpc -version
[0.004] Free Pascal Compiler version 3.0.4+dfsg-22 [2019/01/24] for x86_64
[0.004] Copyright (c) 1993-2017 by Florian Klaempfl and others
program project1;
uses
Classes, SysUtils
, HTTPDefs
, httproute;
procedure PostCallback1(req: TRequest; res: TResponse);
begin
// Actions on post event
end;
procedure PostCallback2(req: TRequest; res: TResponse);
begin
// Actions on post event
end;
begin
try
HTTPRouter.RegisterRoute('/post' , TRouteMethod.rmPost, @PostCallback1, False);
HTTPRouter.RegisterRoute('/post' , TRouteMethod.rmPost, @PostCallback2, False);
except
on E: Exception do begin
Writeln(E.Message);
end;
end;
end.
Thank you