Closed Halbaroth closed 1 month ago
We may raise an exception in the main function of Solving_loop instead of calling exit and catch it immediately in both Main_text an Main_text_js. In the former, we call exit and in the latter we print a message and restart the worker.
I believe that's the standard way of doing this and what we should do.
Ok, I will do it after removing the legacy frontend.
We use the system call
exit
inSolving_loop
in order to halt quickly Alt-Ergo in case of fatal error or recoverable error if we turn on the flagexit_on_error
. Unfortunately, this system call is not available in the Javascript runtime.This issue can be tempered to some extent by turn off the flag
exit_on_error
in JS mode as it is done in #1249 butexit
is still called for fatal errors.I am not sure what is the best solution here. We may raise an exception in the main function of
Solving_loop
instead of callingexit
and catch it immediately in bothMain_text
anMain_text_js
. In the former, we callexit
and in the latter we print a message and restart the worker.