Skip to content

Commit

Permalink
remove useless except & improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
lchenut committed Mar 29, 2024
1 parent a584e85 commit 605171a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions webrtc/udp_connection.nim
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ proc write*(
try:
await self.udp.sendTo(raddr, msg)
except TransportError as exc:
raise newException(WebRtcUdpError, exc.msg, exc)
except CancelledError as exc:
raise exc
raise newException(WebRtcUdpError,
"Error when sending data on a DatagramTransport: " & exc.msg , exc)

proc read*(self: UdpConn): Future[UdpPacketInfo] {.async: (raises: [CancelledError]).} =
## Read the next received Udp message
Expand Down

0 comments on commit 605171a

Please sign in to comment.