mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-05 15:03:07 +00:00
Avoid swallowing CancelledError
This commit is contained in:
parent
ffd149fba8
commit
d2ccc4778a
@ -69,10 +69,11 @@ proc getLongestRequestEnd(
|
||||
return success(0.SecondsSince1970)
|
||||
|
||||
return success(requestEnds.max)
|
||||
except CancelledError, CatchableError:
|
||||
error "Error when trying to get longest request end",
|
||||
error = getCurrentExceptionMsg()
|
||||
return failure("Cannot retrieve the request dates")
|
||||
except CancelledError as err:
|
||||
raise err
|
||||
except CatchableError as err:
|
||||
error "Error when trying to get longest request end", error = err.msg
|
||||
return failure("Cannot retrieve the request dates: " & err.msg)
|
||||
|
||||
proc validate(pattern: string, value: string): int {.gcsafe, raises: [Defect].} =
|
||||
0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user