[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Exceptions from C code / handling them in scheme
From: |
Martin Grabmueller |
Subject: |
Re: Exceptions from C code / handling them in scheme |
Date: |
Tue, 03 Apr 2001 09:11:11 +0200 |
> From: Richard Guenther <address@hidden>
> Date: Sun, 1 Apr 2001 18:37:48 +0200 (CEST)
>
> What is the recommended way to "fail" in C code called from
> scheme? I.e. is there something like an exception that can
> be thrown and catchen in scheme code? I see there is f.i.
> SCM_ASSERT - how can I manually "throw" such an exception and
> how can I catch this in scheme code? A simple example would
> be helpful.
I am using code like the following for signalling errors:
if (!SCM_CHARP (ch))
SCM_MISC_ERROR ("procedure ~S returned non-char", SCM_LIST1 (proc));
But this might require a very recent CVS version of Guile, I haven't
checked for older versions. Have a look at `error.h' from the Guile
distribution to see which functions for error signalling are provided.
Regards,
'martin