Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal Error (Exception External:?) after second exception in Interfaced based Services #432

Open
wanderlan opened this issue Aug 25, 2022 · 1 comment

Comments

@wanderlan
Copy link

wanderlan commented Aug 25, 2022

Scenario:
Windows 10, 64 bit Lazarus 2.2.2, 64 bit Freepascal 3.2.2
Sample 14 - Interfaced based services

In Project14ServerHttp.dpr
Change the method 'Add' by inserting an exception:
function TServiceCalculator.Add(n1, n2: integer): integer;
begin
result := n1+n2;
raise Exception.Create('Test'); // <<< insert this exception
end;

In browser type:
http://localhost:8888/root/calculator/add?n1=1&n2=2
The first execution is ok, the exception is showed correctly
but execute again... the server goes down with the message... >>> Fatal error, External Exception: ?

@wanderlan
Copy link
Author

I tracked the bug, it seems occurs in the CallMethod assembly code (starting at line 57968 in mormot.pas)

@wanderlan wanderlan changed the title Fatal Error (Exception External:?) after second execution in Interfaced based Services Fatal Error (Exception External:?) after second exception in Interfaced based Services Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant