From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Cowan Newsgroups: gmane.lisp.guile.user Subject: Re: Explaining raising conditions and defining condition types in the guile manual Date: Fri, 9 Nov 2018 14:16:16 -0500 Message-ID: References: <87ftwa1bd5.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1541790917 26605 195.159.176.226 (9 Nov 2018 19:15:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Nov 2018 19:15:17 +0000 (UTC) Cc: guile-user@gnu.org To: ludo@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Nov 09 20:15:12 2018 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLCFL-0006n3-Tw for guile-user@m.gmane.org; Fri, 09 Nov 2018 20:15:12 +0100 Original-Received: from localhost ([::1]:35638 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLCHS-00011C-DZ for guile-user@m.gmane.org; Fri, 09 Nov 2018 14:17:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLCGy-000116-Lh for guile-user@gnu.org; Fri, 09 Nov 2018 14:16:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gLCGw-0006e0-CK for guile-user@gnu.org; Fri, 09 Nov 2018 14:16:52 -0500 Original-Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:53904) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gLCGu-0006NT-78 for guile-user@gnu.org; Fri, 09 Nov 2018 14:16:49 -0500 Original-Received: by mail-wm1-x334.google.com with SMTP id f10-v6so2994442wme.3 for ; Fri, 09 Nov 2018 11:16:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccil-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=44p+pDZ7VF9fTVSDk6EhIaeRI1nIrmKpbHbfpZyRTWk=; b=glii1UOD5i763f7n7Dc0fjMiEef5hThHtK/vVOVlDX18ZzD55+xrn55IGqyphgLcLT zfb7V2L5l7MAlgxQDrbSWmJOHsDZaxaGaDr4UPwL1uW9D4D29Q57Dj9pqA1RwgEqVec8 4sw1LJV8sw6onCJQecY1MunvCClWfDUwRuim6kJ5P4GezBbtfknVfCyGOgBd/5gvUexz XLLpPjIL/eSVCVvJ7B1Mbf5lwkRexa0GXtxEznbO4bWF1qbkajnrgSgFxlYXa9TH26Ay 3xSxb+xCFjP5nunrgJo8DHM5s1+CPBFdqKq2pETnoKcfjxgoeGpMBFX8/jvbaW37KgP5 3CtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=44p+pDZ7VF9fTVSDk6EhIaeRI1nIrmKpbHbfpZyRTWk=; b=Ajj8QBHoVy0wSXldHahFC6DLUTYkq+xApW0T7OrTm6gY7yMGYOKFuvKxMaiO0N6EYL LHLivuCVdeQA4NTY7t8/SxpW8QyfM+41R+jDElizb4x2kjNNiCzW7fjlmKxCcb+5DTa4 f9yjEpwl5xeHwJdUtr8tQLbi6311HSruxpH3BvviyiAsduGpYOHwsMhVhWE4WAK6FTvL 1uFEsUmptAViZwGMFwZP4YGFF4KhNm697DRB/MmF61T1xisJ3jPQMfUzza+wvVyXpik0 d8ou4MLnDUqhBRVA9QakVv9tV0Sixyoj5npLMxw5KZdfXVfGHrURQVr7TZ/YAQ11HhF2 tIeg== X-Gm-Message-State: AGRZ1gJ5bJ74tGhYF+wPiYYUCRY/Wuw78jWJ1Wo5sILpLV75RkpGVH0q K/pA6pPlfzZLwkdStqghSZ6WJx2tTyT7h+PER8T0bw== X-Google-Smtp-Source: AJdET5dmX7PvFIViftf+/bwx4mDIA7GpDPwkuQC2G8GsixesjFDTSC2zSdLx8ecJusS/aMErfrpc93qD9D0AGZa4sf0= X-Received: by 2002:a1c:4d2:: with SMTP id 201-v6mr457324wme.133.1541790988557; Fri, 09 Nov 2018 11:16:28 -0800 (PST) In-Reply-To: <87ftwa1bd5.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::334 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:14981 Archived-At: On Fri, Nov 9, 2018 at 11:10 AM Ludovic Court=C3=A8s wrote: 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. :-) > Sorta. The *exception* system is the same as in R6RS except that `error` does not use the `who` argument (staying compatible with SRFI 23). But no *condition* system are defined, so that implementations can keep their native condition systems. (Racket wound up with two condition systems, native and R6RS.) Consequently, portable programs can catch a condition with `guard` or `with-exception-handler`, but can't discriminate between different exceptions, with three, umm, exceptions: `read-error?` says if a condition reflects an error is signaled by `read` indicating bad S-expression syntax. `file-error?` says if a condition reflects a file that cannot be opened or deleted. These cases are precisely those where R5RS says "an error must be signaled"= . (Well, there is also passing a bad number to `scheme-report-environment`, but who cares.) Also, `error-object?` returns true on conditions created and raised by `error`, but may return true on other conditions as well, implementation-dependently= . I'm hoping to add more predicates of this type for R7RS-large. The implementation of such a feature cannot be portable, but should be trivial in any one Scheme. -- John Cowan http://vrici.lojban.org/~cowan cowan@ccil.org Newbies always ask: "Elements or attributes? Which will serve me best?" Those who know roar like lions; Wise hackers smile like tigers. --a tanka, or extended haiku