From 0e56160e859d32adffb7c9df3cd78cde0bff8df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 15 Jul 2022 02:36:07 +0200 Subject: Don't crash on Prolog exceptions. In the future, it may be desirable to convert Prolog exceptions to C++ exceptions. --- c/pl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'c/pl.cpp') diff --git a/c/pl.cpp b/c/pl.cpp index 30b70a9..3172090 100644 --- a/c/pl.cpp +++ b/c/pl.cpp @@ -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; } -- cgit v1.2.3