diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-15 02:36:07 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-15 02:36:07 +0200 |
commit | 0e56160e859d32adffb7c9df3cd78cde0bff8df8 (patch) | |
tree | 5ca15fd27182e661ec2888ddbd8d976dbbadcd09 /c/pl.cpp | |
parent | 2f6bd216d1411bd6ec96eaebf815dc3d5ab5a2f4 (diff) | |
download | EpisodeBrowser-0e56160e859d32adffb7c9df3cd78cde0bff8df8.tar.gz |
Don't crash on Prolog exceptions.
In the future, it may be desirable to convert Prolog exceptions to C++
exceptions.
Diffstat (limited to 'c/pl.cpp')
-rw-r--r-- | c/pl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3,7 +3,7 @@ int Pl(const char *szMod, const char *szPred) { term_t t = PL_new_term_refs(0); - if (!PL_call_predicate(NULL, PL_Q_NORMAL, PL_predicate(szPred, 0, szMod), t)) + if (!PL_call_predicate(NULL, PL_Q_CATCH_EXCEPTION, PL_predicate(szPred, 0, szMod), t)) return 0; return 1; } |