From 37d19c0687d87edf77677d74931d54b4667ebc33 Mon Sep 17 00:00:00 2001 From: Gabriel Cruz <8129788+gmelodie@users.noreply.github.com> Date: Fri, 8 May 2026 14:14:16 -0300 Subject: [PATCH] chore: remove CatchableError (#19) --- ffi/ffi_context.nim | 4 ++-- ffi/logging.nim | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ffi/ffi_context.nim b/ffi/ffi_context.nim index 545d2d0..c755823 100644 --- a/ffi/ffi_context.nim +++ b/ffi/ffi_context.nim @@ -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 diff --git a/ffi/logging.nim b/ffi/logging.nim index b82ec11..bc772be 100644 --- a/ffi/logging.nim +++ b/ffi/logging.nim @@ -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)