Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

fix: improve error reporting when port is in use #33

Merged
merged 1 commit into from
Jul 13, 2022

Conversation

bajtos
Copy link
Contributor

@bajtos bajtos commented Jul 13, 2022

Before this change, when we could not start listening on webserver's TCP port, the binary produced by GoReleaser would abort with no meaningful error report:

❯ ./build/saturn/l2node-darwin-arm64/saturn-l2
[1]    16654 killed     ./build/saturn/l2node-darwin-arm64/saturn-l2

In this commit, I am reworking error handling to print the error to stderr and exit the process with a non-zero exit code via os.Exit.

Before this change, when we could not start listening on webserver's TCP
port, the binary produced by GoReleaser would abort with no meaningful
error report:

```
❯ ./build/saturn/l2node-darwin-arm64/saturn-l2
[1]    16654 killed     ./build/saturn/l2node-darwin-arm64/saturn-l2
```

In this commit, I am reworking error handling to print the error to
stderr and exit the process with a non-zero exit code via `os.Exit`.

Signed-off-by: Miroslav Bajtoš <saturn@bajtos.net>
@bajtos bajtos merged commit 370088e into main Jul 13, 2022
@bajtos bajtos deleted the fix/cannot-listen-error branch July 13, 2022 07:15
@bajtos
Copy link
Contributor Author

bajtos commented Jul 13, 2022

So the crash was not caused by panic() but by something else. It seems to be related to darwin-arm64 version only, darwin-x64 works well. See #35

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

Successfully merging this pull request may close these issues.

1 participant