From 9dfcd9e2d6fa4fdaae86ce529382d30b27a2cec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 4 Jan 2011 18:29:55 +0100 Subject: [PATCH] Document `scm_misc_error' (bug #31969). * doc/ref/api-control.texi (Handling Errors): Add `scm_misc_error'. Suggested by Bake Timmons (bug #31969). --- doc/ref/api-control.texi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi index c8c93ba3b..2375a64cc 100644 --- a/doc/ref/api-control.texi +++ b/doc/ref/api-control.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2009, 2010 +@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2009, 2010, 2011 @c Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @@ -1493,13 +1493,18 @@ and the call to these routines doesn't change @code{errno}. @deftypefnx {C Function} void scm_wrong_type_arg_msg (char *@var{subr}, int @var{argnum}, SCM @var{bad_value}, const char *@var{expected}) @deftypefnx {C Function} void scm_memory_error (char *@var{subr}) Throw an error with the various keys described above. +@deftypefnx {C Function} void scm_misc_error (const char *@var{subr}, const char *@var{message}, SCM @var{args}) -For @code{scm_wrong_num_args}, @var{proc} should be a Scheme symbol +In @code{scm_wrong_num_args}, @var{proc} should be a Scheme symbol which is the name of the procedure incorrectly invoked. The other routines take the name of the invoked procedure as a C string. In @code{scm_wrong_type_arg_msg}, @var{expected} is a C string describing the type of argument that was expected. + +In @code{scm_misc_error}, @var{message} is the error message string, +possibly containing @code{simple-format} escapes (@pxref{Writing}), and +the corresponding arguments in the @var{args} list. @end deftypefn