If the results of the last Prolog.query() call aren't consumed, then the _hook.exit_code will be a generator object. Converting it to an int will fail.
I think, the better way to deal with this is to check if the exit_code is a generator, and if so, warn the users about not executing all of the code they queried.
I'm talking about the file core.py, line 1358 in my version.
If the results of the last
Prolog.query()
call aren't consumed, then the_hook.exit_code
will be a generator object. Converting it to anint
will fail.I think, the better way to deal with this is to check if the
exit_code
is a generator, and if so, warn the users about not executing all of the code they queried.I'm talking about the file
core.py
, line 1358 in my version.