selectors: exceptions are for errors, not for bugs
This commit is contained in:
parent
a470ba673b
commit
791abfbc16
1 changed files with 1 additions and 4 deletions
|
|
@ -317,10 +317,7 @@ else:
|
||||||
proc verifySelectParams(timeout: int) =
|
proc verifySelectParams(timeout: int) =
|
||||||
# Timeout of -1 means: wait forever
|
# Timeout of -1 means: wait forever
|
||||||
# Anything higher is the time to wait in miliseconds.
|
# Anything higher is the time to wait in miliseconds.
|
||||||
if timeout < -1:
|
doAssert(timeout >= -1, "Cannot select with a negative value, got " & $timeout)
|
||||||
raise newException(
|
|
||||||
ValueError, "Cannot select with a negative value, got " & $timeout
|
|
||||||
)
|
|
||||||
|
|
||||||
when defined(linux):
|
when defined(linux):
|
||||||
include ioselects/ioselectors_epoll
|
include ioselects/ioselectors_epoll
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue