manpagez: man pages & more
info guile
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.13.11.1 C Support

In the following C functions, SUBR and MESSAGE parameters can be NULL to give the effect of #f described above.

C Function: SCM scm_error (SCM key, char *subr, char *message, SCM args, SCM rest)

Throw an error, as per scm-error (see section Procedures for Signaling Errors).

C Function: void scm_syserror (char *subr)
C Function: void scm_syserror_msg (char *subr, char *message, SCM args)

Throw an error with key system-error and supply errno in the rest argument. For scm_syserror the message is generated using strerror.

Care should be taken that any code in between the failing operation and the call to these routines doesn’t change errno.

C Function: void scm_num_overflow (char *subr)
C Function: void scm_out_of_range (char *subr, SCM bad_value)
C Function: void scm_wrong_num_args (SCM proc)
C Function: void scm_wrong_type_arg (char *subr, int argnum, SCM bad_value)
C Function: void scm_wrong_type_arg_msg (char *subr, int argnum, SCM bad_value, const char *expected)
C Function: void scm_memory_error (char *subr)
C Function: void scm_misc_error (const char *subr, const char *message, SCM args)

Throw an error with the various keys described above.

In scm_wrong_num_args, 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 scm_wrong_type_arg_msg, expected is a C string describing the type of argument that was expected.

In scm_misc_error, message is the error message string, possibly containing simple-format escapes (see section Writing), and the corresponding arguments in the args list.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on April 20, 2013 using texi2html 5.0.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.