Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow websocket routine with no arguments (and be less eager to CATCH) #20

Open
Altreus opened this issue Jan 27, 2019 · 0 comments
Open

Comments

@Altreus
Copy link
Contributor

Altreus commented Jan 27, 2019

You currently have to do either

web-socket -> $incoming -> { }

or

web-socket -> $incoming, $on-close -> { }

As usual with my persistent bastardisations of your code, I don't actually use either thing in my test code, so I just had

web-socket -> { }

This caused the obscure error

  in code  at .../lib/Cro/WebSocket/Handler.pm6 (Cro::WebSocket::Handler) line 50

A runtime error from Perl caught by an overeager CATCH. First, it would be nice to support no arguments here; second, some errors should just die hard and I think ones from Perl6 itself should be included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant