diff options
author | Javier Candeira <javier@candeira.com> | 2017-08-09 14:40:45 +1000 |
---|---|---|
committer | Javier Candeira <javier@candeira.com> | 2017-08-13 22:52:33 +1000 |
commit | 35a1fea90b2cae9d5cc8e9eab62ba4c67e8786db (patch) | |
tree | 26616de189a9154309287846bf76fb1cdab8ce51 /extmod/modujson.c | |
parent | b6a328956467339f568b19d9192fbbfdfa47a572 (diff) |
all: Raise exceptions via mp_raise_XXX
- Changed: ValueError, TypeError, NotImplementedError
- OSError invocations unchanged, because the corresponding utility
function takes ints, not strings like the long form invocation.
- OverflowError, IndexError and RuntimeError etc. not changed for now
until we decide whether to add new utility functions.
Diffstat (limited to 'extmod/modujson.c')
-rw-r--r-- | extmod/modujson.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/modujson.c b/extmod/modujson.c index f94ec7db8..6c4aa1611 100644 --- a/extmod/modujson.c +++ b/extmod/modujson.c @@ -269,7 +269,7 @@ STATIC mp_obj_t mod_ujson_load(mp_obj_t stream_obj) { return stack_top; fail: - nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "syntax error in JSON")); + mp_raise_ValueError("syntax error in JSON"); } STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_ujson_load_obj, mod_ujson_load); |