
Hi there,
I am repeating here a question I have already asked on April 10 and that remained unanswered (sorry about that, but I am stuck). What is the recommended way to raise a Prolog exception from foreign C code? Is it
Pl_Exec_Continuation(Find_Atom("throw"), 1, &t)
where t is any variable of type PlTerm? The manual seems to suggest that, but I would like to know for sure. Moreover, even though the simple examples work without problems, trying to raise an exception this way from a rather complex C++ library almost always results in segmentation violations or illegal instructions being executed. And gdb does not seem to be of much help debugging that. Perhaps the Pl_Exec_Continuation technique works only under certain circumstances, but which ones? Is anybody out there raising exceptions from C++ code? Thanks a lot
Roberto