File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ let rec unfold f u () =
270270 match f u with
271271 | None -> return_nil
272272 | Some (x , u' ) -> Lwt. return (Cons (x, unfold f u'))
273- | exception exc -> Lwt. fail exc
273+ | exception exc when Lwt. is_not_ocaml_runtime_exception exc -> Lwt. fail exc
274274
275275let rec unfold_lwt f u () =
276276 let * x = f u in
@@ -305,7 +305,7 @@ let rec of_seq seq () =
305305 | Seq. Nil -> return_nil
306306 | Seq. Cons (x , next ) ->
307307 Lwt. return (Cons (x, (of_seq next)))
308- | exception exn -> Lwt. fail exn
308+ | exception exn when Lwt. is_not_ocaml_runtime_exception exn -> Lwt. fail exn
309309
310310let rec of_seq_lwt (seq : 'a Lwt.t Seq.t ): 'a t = fun () ->
311311 match seq () with
@@ -321,4 +321,4 @@ let of_seq_lwt (seq: 'a Lwt.t Seq.t): 'a t = fun () ->
321321 let + x = x in
322322 let next = of_seq_lwt next in
323323 Cons (x, next)
324- | exception exc -> Lwt. fail exc
324+ | exception exc when Lwt. is_not_ocaml_runtime_exception exc -> Lwt. fail exc
You can’t perform that action at this time.
0 commit comments