chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] SRFI-12 non-compliance


From: Reed Sheridan
Subject: Re: [Chicken-users] SRFI-12 non-compliance
Date: Mon, 8 May 2006 03:54:53 -0500

I've found a problem with the new srfi-12 stuff: this raises a weird error:
(signal (make-property-condition 'exn 'location 'here 'message "foo"
'arguments '()))

I figured that this was due to the recent change in condition
representation, so I fixed it, but then I found that the
representation for conditions is inconsistent:

#;2> (dissect (handle-exceptions e e s))
#<condition: (exn)>
 [0] condition
 [1] (exn)
 [2] ((exn . message) "unbound variable" (exn . arguments) (s) (ex ---

#;3> (dissect (make-property-condition 'exn 'location 'here 'message
"foo" 'arguments '()))
#<condition: (exn)>
 [0] condition
 [1] (exn)
 [2] ((exn . location) (exn . here) (exn . message) (exn . "foo")

The old ##sys#current-exception-handler handles conditions of the
first, but not of the second kind.  My version works with the second,
but not the first representation of conditions, with the result that,
while (signal (make-property-condition...)) works, something like (car
1) leads to an infinite loop as the exception handler raises
exceptions.

If I understand what Felix said about the new representation
correctly, my version is the correct one, but it'll break Chicken
horribly without a fix for common errors (are those done in C and not
affected by make-property-condition?).  So I've attached it as a patch
instead of pushing it to the repository.

Reed Sheridan

Attachment: exn.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]