[m-rev.] for review: Document that throwing exceptions across the C interface is unsupported.

Peter Wang novalazy at gmail.com
Tue Sep 20 15:30:34 AEST 2016


doc/reference_manual.texi:
	Document that throwing exceptions across the C interface is
	unsupported. This was previously only mentioned at the top of
	exception.m.
---
 doc/reference_manual.texi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/doc/reference_manual.texi b/doc/reference_manual.texi
index 4f64956..ba55883 100644
--- a/doc/reference_manual.texi
+++ b/doc/reference_manual.texi
@@ -8125,6 +8125,11 @@ These @samp{type_info} arguments can be obtained using the Mercury
 
 To use the C declarations produced see @ref{Using pragma foreign_decl for C}.
 
+Throwing an exception across the C interface is not supported.
+That is, if a Mercury procedure that is exported to C using
+ at code{pragma foreign_export} throws an exception which is not caught within
+that procedure, then you will get undefined behaviour.
+
 @node Using pragma foreign_decl for C
 @subsubsection Using pragma foreign_decl for C
 
-- 
2.9.0



More information about the reviews mailing list