From 9df5620f5bbd571a00c1a9aa8567f2efe1974880 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 20 Jan 2023 22:34:08 +0000 Subject: Catch C++ xapian exceptions and raise them as scheme exceptions. Uncaught C++ exceptions crash the guile process without providing scheme code any opportunity to respond. * except.i, xapian/error.scm: New files. * xapian.i.in: Include except.i. * Makefile.am (SOURCES): Add xapian/error.scm. (xapian_wrap.cc xapian/wrap.scm &): Depend on except.i. --- Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index e88d63b..7c7785e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ # guile-xapian --- Guile bindings for Xapian -# Copyright © 2020, 2021, 2022 Arun Isaac +# Copyright © 2020, 2021, 2022, 2023 Arun Isaac # Copyright © 2022 Bob131 # # This file is part of guile-xapian. @@ -50,7 +50,7 @@ CLEANFILES = xapian.i xapian_wrap.cc xapian/wrap.scm xapian.i: xapian.i.in Makefile sed -e 's|@libdir[@]|$(libdir)|g' -e 's|@GUILE_EFFECTIVE_VERSION[@]|$(GUILE_EFFECTIVE_VERSION)|g' $< > $@ -xapian_wrap.cc xapian/wrap.scm &: xapian.i xapian-head.i xapian-headers.i +xapian_wrap.cc xapian/wrap.scm &: xapian.i xapian-head.i xapian-headers.i except.i $(MKDIR_P) xapian $(SWIG_GEN)$(SWIG) $(SWIG_FLAGS) -I$(srcdir) -scmstub -o xapian_wrap.cc -guile -package xapian -c++ $< @@ -59,7 +59,7 @@ xapian_wrap.cc xapian/wrap.scm &: xapian.i xapian-head.i xapian-headers.i moddir = $(prefix)/share/guile/site/$(GUILE_EFFECTIVE_VERSION) godir = $(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache -SOURCES = xapian/wrap.scm xapian/xapian.scm +SOURCES = xapian/error.scm xapian/wrap.scm xapian/xapian.scm GOBJECTS = $(SOURCES:%.scm=%.go) nobase_mod_DATA = $(SOURCES) -- cgit v1.2.3