summaryrefslogtreecommitdiffstatshomepage
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/file.c2
-rw-r--r--unix/modffi.c2
-rw-r--r--unix/modjni.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/unix/file.c b/unix/file.c
index f27e23547d..0d65f9ca0d 100644
--- a/unix/file.c
+++ b/unix/file.c
@@ -47,7 +47,7 @@
#ifdef MICROPY_CPYTHON_COMPAT
STATIC void check_fd_is_open(const mp_obj_fdfile_t *o) {
if (o->fd < 0) {
- nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "I/O operation on closed file"));
+ mp_raise_ValueError("I/O operation on closed file");
}
}
#else
diff --git a/unix/modffi.c b/unix/modffi.c
index 6c5e4f22ee..9b514371bc 100644
--- a/unix/modffi.c
+++ b/unix/modffi.c
@@ -409,7 +409,7 @@ STATIC mp_obj_t ffifunc_call(mp_obj_t self_in, size_t n_args, size_t n_kw, const
}
error:
- nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "Don't know how to pass object to native function"));
+ mp_raise_TypeError("Don't know how to pass object to native function");
}
STATIC const mp_obj_type_t ffifunc_type = {
diff --git a/unix/modjni.c b/unix/modjni.c
index 540964d446..df9cd9d67a 100644
--- a/unix/modjni.c
+++ b/unix/modjni.c
@@ -268,7 +268,7 @@ STATIC mp_obj_t jobject_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value)
return mp_const_none;
}
}
- mp_not_implemented("");
+ mp_raise_NotImplementedError("");
}
if (!JJ(IsInstanceOf, self->obj, List_class)) {