From 4d61345978291ce11d8aab5877a1974abc8acfdb Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Fri, 22 Nov 2019 18:59:02 +0200 Subject: [PATCH] Use CatchableError as base instead of Exception --- chronos/asyncfutures2.nim | 2 +- chronos/asyncsync.nim | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chronos/asyncfutures2.nim b/chronos/asyncfutures2.nim index cd2fd063..493c540c 100644 --- a/chronos/asyncfutures2.nim +++ b/chronos/asyncfutures2.nim @@ -53,7 +53,7 @@ type FutureVar*[T] = distinct Future[T] - FutureError* = object of Exception + FutureError* = object of CatchableError cause*: FutureBase CancelledError* = object of FutureError diff --git a/chronos/asyncsync.nim b/chronos/asyncsync.nim index 3ba65a19..c526cc1e 100644 --- a/chronos/asyncsync.nim +++ b/chronos/asyncsync.nim @@ -49,11 +49,11 @@ type queue: Deque[T] maxsize: int - AsyncQueueEmptyError* = object of Exception + AsyncQueueEmptyError* = object of CatchableError ## ``AsyncQueue`` is empty. - AsyncQueueFullError* = object of Exception + AsyncQueueFullError* = object of CatchableError ## ``AsyncQueue`` is full. - AsyncLockError* = object of Exception + AsyncLockError* = object of CatchableError ## ``AsyncLock`` is either locked or unlocked. proc newAsyncLock*(): AsyncLock =