From 87232a38e4fc40a3acb154a78bf32f8ea5734d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20Nihlg=C3=A5rd?= Date: Thu, 10 Jan 2019 08:49:57 +0100 Subject: [PATCH] ValueError now inherits from CatchableError (#10246) --- changelog.md | 4 +++- lib/system.nim | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 35d2adbd1c..87885aec96 100644 --- a/changelog.md +++ b/changelog.md @@ -30,7 +30,9 @@ - `osproc.execProcess` now also takes a `workingDir` parameter. -- `options.UnpackError` is no longer a ref type and inherits from `System.Defect` instead of `System.ValueError`. +- `options.UnpackError` is no longer a ref type and inherits from `system.Defect` instead of `system.ValueError`. + +- `system.ValueError` now inherits from `system.CatchableError` instead of `system.Defect`. - nre's `RegexMatch.{captureBounds,captures}[]` no longer return `Option` or `nil`/`""`, respectivly. Use the newly added `n in p.captures` method to diff --git a/lib/system.nim b/lib/system.nim index c68eba2e08..8a35714a51 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -606,7 +606,7 @@ type ## Raised when assertion is proved wrong. ## ## Usually the result of using the `assert() template <#assert>`_. - ValueError* = object of Defect ## \ + ValueError* = object of CatchableError ## \ ## Raised for string and object conversion errors. KeyError* = object of ValueError ## \ ## Raised if a key cannot be found in a table.