From ad0029e3eeb41b7af2276f565d4f7baee613d05e Mon Sep 17 00:00:00 2001 From: Michael Bradley Date: Fri, 19 Nov 2021 09:47:58 -0600 Subject: [PATCH] add raises pragma to registerEvent in ioselectors_epoll (#237) Include `IOSelectorsException` in addition to `Defect` in `raises: []`. --- chronos/ioselects/ioselectors_epoll.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chronos/ioselects/ioselectors_epoll.nim b/chronos/ioselects/ioselectors_epoll.nim index 16daa2d..5a30444 100644 --- a/chronos/ioselects/ioselectors_epoll.nim +++ b/chronos/ioselects/ioselectors_epoll.nim @@ -354,7 +354,7 @@ when not defined(android): inc(s.count) result = fdi -proc registerEvent*[T](s: Selector[T], ev: SelectEvent, data: T) = +proc registerEvent*[T](s: Selector[T], ev: SelectEvent, data: T) {.raises: [Defect, IOSelectorsException].} = let fdi = int(ev.efd) doAssert(s.fds[fdi].ident == InvalidIdent, "Event is already registered in the queue!") s.setKey(fdi, {Event.User}, 0, data)