diff options
Diffstat (limited to 'test/js/websockets_hello.ml')
-rw-r--r-- | test/js/websockets_hello.ml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/js/websockets_hello.ml b/test/js/websockets_hello.ml index e5f75f6..91c2b70 100644 --- a/test/js/websockets_hello.ml +++ b/test/js/websockets_hello.ml @@ -37,4 +37,12 @@ let () = let* stream, push = Stream.start domain in Lwt.catch (fun () -> main (stream, push) config >|= (fun () -> push None)) - (fun exn -> push None; Lwt.fail exn) + (fun exn -> + push None; + (* I suspect JavaScript's [wrap_callback] swallows the Exceptions thrown by + OCaml, so... The next best thing is probably printing something. *) + print_endline + (match exn with + | Stream.InvalidStanza stanza -> "Invalid stanza: " ^ stanza + | _ -> "... and so I stumble back to bed."); + Lwt.fail exn) |