add raises pragma to registerEvent in ioselectors_epoll (#237)

Include `IOSelectorsException` in addition to `Defect` in `raises: []`.
This commit is contained in:
Michael Bradley 2021-11-19 09:47:58 -06:00 committed by GitHub
parent b24ee653d3
commit ad0029e3ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)