From e59386d1cef3a18c5cd1f67c8da882847e8456f2 Mon Sep 17 00:00:00 2001 From: Jeroen van der Heijden Date: Wed, 7 Feb 2024 15:24:55 +0100 Subject: [PATCH] Spell mistake and err() nil on success --- CHANGELOG.md | 2 ++ inc/ti/fn/fnerr.h | 2 +- inc/ti/version.h | 2 +- itest/test_advanced.py | 4 ++-- src/ti/field.c | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6335129..b4ba3076 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,8 @@ * Added set operators `<=`, `<`, `>=`, `>` for subset, proper subset, superset and proper superset checking. * Added range `<..>` support for UTF8 type property definitions. * Added bitwise NOT (`~`) operator. +* Return `nil` instead of success error when a repeating task is successful. +* Corrected a spelling mistake in error message for integer range values. # v1.4.16 diff --git a/inc/ti/fn/fnerr.h b/inc/ti/fn/fnerr.h index 1a6fa74e..f6f632f0 100644 --- a/inc/ti/fn/fnerr.h +++ b/inc/ti/fn/fnerr.h @@ -13,7 +13,7 @@ static int do__f_err_task(ti_query_t * query, cleri_node_t * nd, ex_t * e) if (fn_nargs("err", DOC_TASK_ERR, 0, nargs, e)) return e->nr; - if (vtask->verr) + if (vtask->verr && vtask->verr->code) { query->rval = (ti_val_t *) vtask->verr; ti_incref(query->rval); diff --git a/inc/ti/version.h b/inc/ti/version.h index a1469293..a007b61c 100644 --- a/inc/ti/version.h +++ b/inc/ti/version.h @@ -25,7 +25,7 @@ * "-rc0" * "" */ -#define TI_VERSION_PRE_RELEASE "-alpha13" +#define TI_VERSION_PRE_RELEASE "-alpha14" #define TI_MAINTAINER \ "Jeroen van der Heijden " diff --git a/itest/test_advanced.py b/itest/test_advanced.py index 2bb79f56..4bc0dfac 100755 --- a/itest/test_advanced.py +++ b/itest/test_advanced.py @@ -710,7 +710,7 @@ async def test_conditions(self, client): with self.assertRaisesRegex( ValueError, r'mismatch in type `Foo`; ' - r'property `int_a` requires a float value between ' + r'property `int_a` requires an integer value between ' r'0 and 10 \(both inclusive\)'): await client.query(r''' Foo{int_a: -1}; @@ -719,7 +719,7 @@ async def test_conditions(self, client): with self.assertRaisesRegex( ValueError, r'mismatch in type `Foo`; ' - r'property `int_a` requires a float value between ' + r'property `int_a` requires an integer value between ' r'0 and 10 \(both inclusive\)'): await client.query(r''' Foo{int_a: 11}; diff --git a/src/ti/field.c b/src/ti/field.c index ee7b0dfd..8a78aec8 100644 --- a/src/ti/field.c +++ b/src/ti/field.c @@ -1863,7 +1863,7 @@ int ti_field_make_assignable( irange_error: ex_set(e, EX_VALUE_ERROR, "mismatch in type `%s`; " - "property `%s` requires a float value between " + "property `%s` requires an integer value between " "%"PRId64" and %"PRId64" (both inclusive)", field->type->name, field->name->str,