Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ffi/ffi_context.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ffi/logging.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
Loading