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/moduheapq.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/moduheapq.c')
-rw-r--r-- | extmod/moduheapq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/moduheapq.c b/extmod/moduheapq.c index e6e417d2b..4a620bad8 100644 --- a/extmod/moduheapq.c +++ b/extmod/moduheapq.c @@ -35,7 +35,7 @@ STATIC mp_obj_list_t *get_heap(mp_obj_t heap_in) { if (!MP_OBJ_IS_TYPE(heap_in, &mp_type_list)) { - nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "heap must be a list")); + mp_raise_TypeError("heap must be a list"); } return MP_OBJ_TO_PTR(heap_in); } |