summaryrefslogtreecommitdiff
path: root/extmod
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2017-02-24 15:13:07 +0100
committerScott Shawcroft <scott.shawcroft@gmail.com>2017-02-24 15:13:07 +0100
commit12fa5b3a66d6f0034113a56c7d647c7bac5be74c (patch)
treecc4d5103421f930b7ebaa20eb7d6c8d59c6b6f0d /extmod
parentefd429464ed82c78fd2e11244a803c7ec2cb2211 (diff)
Switch exception throwing to mp_raise helpers. It saves a little code space each time to share the call.
Diffstat (limited to 'extmod')
-rw-r--r--extmod/modlwip.c2
-rw-r--r--extmod/modure.c2
-rw-r--r--extmod/modussl_axtls.c2
-rw-r--r--extmod/modussl_mbedtls.c2
-rw-r--r--extmod/modutimeq.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/extmod/modlwip.c b/extmod/modlwip.c
index 62699bd41..57fb2845f 100644
--- a/extmod/modlwip.c
+++ b/extmod/modlwip.c
@@ -1025,7 +1025,7 @@ STATIC mp_obj_t lwip_socket_sendall(mp_obj_t self_in, mp_obj_t buf_in) {
break;
}
case MOD_NETWORK_SOCK_DGRAM:
- mp_not_implemented("");
+ mp_raise_NotImplementError("");
break;
}
diff --git a/extmod/modure.c b/extmod/modure.c
index b8c242429..ba8a2e07a 100644
--- a/extmod/modure.c
+++ b/extmod/modure.c
@@ -153,7 +153,7 @@ STATIC mp_obj_t re_split(size_t n_args, const mp_obj_t *args) {
mp_obj_t s = mp_obj_new_str(subj.begin, caps[0] - subj.begin, false);
mp_obj_list_append(retval, s);
if (self->re.sub > 0) {
- mp_not_implemented("Splitting with sub-captures");
+ mp_raise_NotImplementError("Splitting with sub-captures");
}
subj.begin = caps[1];
if (maxsplit > 0 && --maxsplit == 0) {
diff --git a/extmod/modussl_axtls.c b/extmod/modussl_axtls.c
index 416915821..f238fb7c1 100644
--- a/extmod/modussl_axtls.c
+++ b/extmod/modussl_axtls.c
@@ -126,7 +126,7 @@ STATIC mp_obj_t socket_setblocking(mp_obj_t self_in, mp_obj_t flag_in) {
// Currently supports only blocking mode
(void)self_in;
if (!mp_obj_is_true(flag_in)) {
- mp_not_implemented("");
+ mp_raise_NotImplementError("");
}
return mp_const_none;
}
diff --git a/extmod/modussl_mbedtls.c b/extmod/modussl_mbedtls.c
index a7b8a1440..82ad262c4 100644
--- a/extmod/modussl_mbedtls.c
+++ b/extmod/modussl_mbedtls.c
@@ -219,7 +219,7 @@ STATIC mp_obj_t socket_setblocking(mp_obj_t self_in, mp_obj_t flag_in) {
// Currently supports only blocking mode
(void)self_in;
if (!mp_obj_is_true(flag_in)) {
- mp_not_implemented("");
+ mp_raise_NotImplementError("");
}
return mp_const_none;
}
diff --git a/extmod/modutimeq.c b/extmod/modutimeq.c
index f73b39103..26ccb5182 100644
--- a/extmod/modutimeq.c
+++ b/extmod/modutimeq.c
@@ -121,7 +121,7 @@ STATIC mp_obj_t mod_utimeq_heappush(size_t n_args, const mp_obj_t *args) {
mp_obj_t heap_in = args[0];
mp_obj_utimeq_t *heap = get_heap(heap_in);
if (heap->len == heap->alloc) {
- mp_raise_msg(&mp_type_IndexError, "queue overflow");
+ mp_raise_IndexError("queue overflow");
}
mp_uint_t l = heap->len;
heap->items[l].time = MP_OBJ_SMALL_INT_VALUE(args[1]);