chore: remove CatchableError (#19)

This commit is contained in:
Gabriel Cruz 2026-05-08 14:14:16 -03:00 committed by GitHub
parent e3eca63236
commit 37d19c0687
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -163,8 +163,8 @@ proc processRequest[T](
let res =
try:
await retFut
except CatchableError as exc:
Result[string, string].err("Exception in processRequest for " & reqId & ": " & exc.msg)
except AsyncError as exc:
Result[string, string].err("Async error in processRequest for " & reqId & ": " & exc.msg)
## handleRes may raise (OOM, GC setup) even though it is rare. Catching here
## keeps the async proc raises:[] compatible. The defer inside handleRes

View File

@ -58,7 +58,7 @@ proc writeAndFlush(f: syncio.File, s: LogOutputStr) =
try:
f.write(s)
f.flushFile()
except CatchableError:
except IOError:
logLoggingFailure(cstring(s), getCurrentException())
## Setup
@ -99,7 +99,7 @@ proc setupLog*(level: LogLevel, format: LogFormat) =
let color =
try:
not parseBool(os.getEnv("NO_COLOR", "false"))
except CatchableError:
except ValueError:
true
setupLogLevel(level)