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

Cro::HTTP::Server doesn't provide means to handle listener errors #123

Open
vrurg opened this issue Jan 22, 2021 · 0 comments
Open

Cro::HTTP::Server doesn't provide means to handle listener errors #123

vrurg opened this issue Jan 22, 2021 · 0 comments

Comments

@vrurg
Copy link
Contributor

vrurg commented Jan 22, 2021

There is no way to tell if a Cro server instance can't start due to an error. Taking an example from the documentation and changing the port so that it'd fail under a non-root account would be a good example:

my $application = route {
    get -> {
        content 'text/html', '<strong>Hello, world!</strong>';
    }
}
my Cro::Service $hello-service = Cro::HTTP::Server.new(
    :host('localhost'), :port(80), :$application
);
$hello-service.start;

It ends up with LTA message:

permission denied

And I can't even locate where exactly the message is printed.

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