From 791abfbc165c11c725358a0279301af9a3094569 Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 15 May 2019 18:19:17 +0200 Subject: [PATCH] selectors: exceptions are for errors, not for bugs --- lib/pure/selectors.nim | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/pure/selectors.nim b/lib/pure/selectors.nim index e2ab98ba87..9b149e26cb 100644 --- a/lib/pure/selectors.nim +++ b/lib/pure/selectors.nim @@ -317,10 +317,7 @@ else: proc verifySelectParams(timeout: int) = # Timeout of -1 means: wait forever # Anything higher is the time to wait in miliseconds. - if timeout < -1: - raise newException( - ValueError, "Cannot select with a negative value, got " & $timeout - ) + doAssert(timeout >= -1, "Cannot select with a negative value, got " & $timeout) when defined(linux): include ioselects/ioselectors_epoll