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

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

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


From: Michael Heerdegen
Subject: bug#37888: 27.0.50; Streams and errors in element generation
Date: Thu, 24 Oct 2019 13:38:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Hello again,

Btw, AFAIU this problem pertains any form of nonlocal exit, not only
errors.  Using nonlocal exits in stream element generation (e.g. via
`while-no-input') is a common use case for me.  My suggested should fix
this.


Regards,

Michael.

> consider this case (it appeared to me in real life):
>
> (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")))
>
> 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 ...)





reply via email to

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