[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Raising Prolog exceptions from C code (2nd attempt)
From: |
Roberto Bagnara |
Subject: |
Raising Prolog exceptions from C code (2nd attempt) |
Date: |
Fri, 07 Jun 2002 18:43:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020516 |
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
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:address@hidden
- Raising Prolog exceptions from C code (2nd attempt),
Roberto Bagnara <=
- Re: Raising Prolog exceptions from C code (2nd attempt), Joseph Benden, 2002/06/07
- Re: Raising Prolog exceptions from C code (2nd attempt), Roberto Bagnara, 2002/06/07
- Re: Raising Prolog exceptions from C code (2nd attempt), Daniele Peri, 2002/06/10
- Re: [PPL-devel] Re: Raising Prolog exceptions from C code (2nd attempt), Roberto Bagnara, 2002/06/10
- Re: [PPL-devel] Re: Raising Prolog exceptions from C code (2nd attempt), Manuel Carro, 2002/06/10
- Re: [PPL-devel] Re: Raising Prolog exceptions from C code (2nd attempt), Roberto Bagnara, 2002/06/10
- Re: [PPL-devel] Re: Raising Prolog exceptions from C code (2nd attempt), Manuel Carro, 2002/06/11
- Re: [PPL-devel] Re: Raising Prolog exceptions from C code (2nd attempt), Fergus Henderson, 2002/06/11
- Re: [PPL-devel] Re: Raising Prolog exceptions from C code (2nd attempt), Fergus Henderson, 2002/06/11
- Re: [PPL-devel] Re: Raising Prolog exceptions from C code (2nd attempt), Daniel Diaz, 2002/06/11