Next: , Previous: cpg-ref-SP_query_cut_fail, Up: cpg-bif

12.3.86 SP_raise_exception()


     #include <sicstus/sicstus.h>
     SP_raise_exception(SP_term_ref term);

Raises an exception in the scope of Prolog calling C.


The SP_term_ref whose value will be the exception term.


The exception will be stored as pending. This function is normally used in the context of a call from Prolog to C, and will cause the exception to be propagated to Prolog on return from the call. The effect is as if raise_exception/1 was called with the term as argument.

Please note: this should only be called right before returning to Prolog.

See Also

Exception Handling in C.

Send feedback on this subject.