add raises annotation

This commit is contained in:
Jaremy Creechley 2023-06-22 17:08:53 -07:00
parent b68d33cef2
commit 76004d35af
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@
## more requests will be needed for a lookup (adding bandwidth and latency).
## This might be a concern for mobile devices.
{.push raises: [Defect].}
{.push raises: [].}
import
std/[tables, sets, options, math, sequtils, algorithm, strutils],

View File

@ -36,7 +36,7 @@ type
proc sendToA(t: Transport, a: Address, data: seq[byte]) =
let ta = initTAddress(a.ip, a.port)
let f = t.transp.sendTo(ta, data)
f.callback = proc(data: pointer) {.gcsafe.} =
f.callback = proc(data: pointer) {.gcsafe, raises: [].} =
if f.failed:
# Could be `TransportUseClosedError` in case the transport is already
# closed, or could be `TransportOsError` in case of a socket error.