vacp2p / nim-libp2p

libp2p implementation in Nim
https://vacp2p.github.io/nim-libp2p/docs/
MIT License
242 stars 52 forks source link

catch `WebSocketError` in `wstransport` #1049

Closed etan-status closed 4 months ago

etan-status commented 4 months ago

Ensure all errors raised by nim-websock are caught. That library is not yet updated regarding {.async: (raises).}, so an extra entry is needed for CatchableError to avoid polluting the callstack with it.

etan-status commented 4 months ago

Also aligned with chronosstream exception converter template.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 82.77%. Comparing base (6c87348) to head (d78f013).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1049/graphs/tree.svg?width=650&height=150&src=pr&token=UR5JRQ249W&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im)](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1049?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im) ```diff @@ Coverage Diff @@ ## unstable #1049 +/- ## ============================================ - Coverage 82.77% 82.77% -0.01% ============================================ Files 91 91 Lines 15604 15608 +4 ============================================ + Hits 12916 12919 +3 - Misses 2688 2689 +1 ``` | [Files](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1049?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im) | Coverage Δ | | |---|---|---| | [libp2p/transports/wstransport.nim](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1049?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#diff-bGlicDJwL3RyYW5zcG9ydHMvd3N0cmFuc3BvcnQubmlt) | `84.78% <57.14%> (-0.18%)` | :arrow_down: |