unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: swedebugia <swedebugia@riseup.net>
Cc: guile-user@gnu.org
Subject: Re: Explaining raising conditions and defining condition types in the guile manual
Date: Fri, 09 Nov 2018 17:09:26 +0100	[thread overview]
Message-ID: <87ftwa1bd5.fsf@gnu.org> (raw)
In-Reply-To: <c8c07534-3233-c0b5-189c-2359f1762113@riseup.net> (swedebugia's message of "Fri, 9 Nov 2018 12:46:46 +0100")

Hello,

swedebugia <swedebugia@riseup.net> skribis:

> Reading in the Guile manual I did not find a section describing this
> use of exceptions:
>
> (raise (condition (...
>
> ^ used by Ludo here:
> http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system/mapped-devices.scm#n145
>
> It seems elegant and nice and maybe a generic example based on it
> could fit somewhere in the manual. :)
>
> By searching for "&message" i at last found the implementation
> detailing r6ns exceptions in the guile manual but there were no
> examples or prose explaining what they are good for.

‘raise’ is from (srfi srfi-34) and ‘condition’, ‘&message’, and friends
are from (srfi srfi-35):

  https://gnu.org/software/guile/manual/html_node/SRFI_002d34.html
  https://gnu.org/software/guile/manual/html_node/SRFI_002d35.html

The R6RS exception mechanism is close to but different from SRFI-34/35,
and I presume the R7RS mechanism is likewise close to but different from
both R6 and SRFI-34/35.  :-)

HTH!

Ludo’.



  parent reply	other threads:[~2018-11-09 16:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-09 11:46 Explaining raising conditions and defining condition types in the guile manual swedebugia
2018-11-09 15:45 ` swedebugia
2018-11-09 15:46 ` swedebugia
2018-11-09 16:09 ` Ludovic Courtès [this message]
2018-11-09 19:16   ` John Cowan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ftwa1bd5.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-user@gnu.org \
    --cc=swedebugia@riseup.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).