emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#37888: closed (27.0.50; Streams and errors in element generation)


From: GNU bug Tracking System
Subject: bug#37888: closed (27.0.50; Streams and errors in element generation)
Date: Sat, 08 Feb 2020 17:22:02 +0000

Your message dated Sat, 08 Feb 2020 18:21:43 +0100
with message-id <address@hidden>
and subject line Re: bug#37888: 27.0.50; Streams and errors in element 
generation
has caused the debbugs.gnu.org bug report #37888,
regarding 27.0.50; Streams and errors in element generation
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
37888: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37888
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 27.0.50; Streams and errors in element generation Date: Wed, 23 Oct 2019 16:27:36 +0200
Hi,

consider this case (it appeared to me in real life):

--8<---------------cut here---------------start------------->8---
(defun test-stream (n)
  (stream-cons n (if (< n 0) (error "test") (test-stream (1- n)))))

(setq my-stream (test-stream 10))

(condition-case nil (seq-length my-stream)
  (error (message "Hmm, didn't work so well")))
--8<---------------cut here---------------end--------------->8---

Now, what happened to `my-stream' after evaluating this?  If you try to
use it, you get a quite confusing error:

(seq-length my-stream)

|-- stream--force: Wrong type argument: streamp, (((n . -1) t) nil ...)

i.e. the stream is broken.  I wonder if we could improve this case.  I'm
not sure how, however.  Should referencing the element whose generation
caused the error raise the same error again, or a standardized kind of
error?  Should the whole stream be invalidated in some way?  FWIW, in my
use case I expected the stream to raise the same error again.  Would it
be reasonable to make the stream just retry to calculate the problematic
element?


TIA,

Michael.


In GNU Emacs 27.0.50 (build 27, x86_64-pc-linux-gnu, GTK+ Version 3.24.12)
 of 2019-10-23 built on drachen
Repository revision: 39ba44f18445c7759de5ac91ce25e53123c2abeb
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux bullseye/sid




--- End Message ---
--- Begin Message --- Subject: Re: bug#37888: 27.0.50; Streams and errors in element generation Date: Sat, 08 Feb 2020 18:21:43 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Michael Heerdegen <address@hidden> writes:

> Installed.
>
> @Nicolas: Would you mind when I also bump the version of stream to
> 2.2.5 and update the copyright years of the files in the stream
> package?

I've done this now.  We are done and I'm closing this bug.


Thanks,

Michael.


--- End Message ---

reply via email to

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