From 1763ffe2450fa07c74db225cc5ef3a6e2feb669b Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 20 Nov 2018 23:04:58 -0500 Subject: More UUID work; use mp_raise for exceptions --- py/runtime.c | 3 +++ py/runtime.h | 1 + 2 files changed, 4 insertions(+) (limited to 'py') diff --git a/py/runtime.c b/py/runtime.c index 3d7a97f58..339978dad 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -1599,6 +1599,9 @@ NORETURN void mp_raise_OSError(int errno_) { nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(errno_))); } +NORETURN void mp_raise_OSError_msg(const compressed_string_t *msg) { + mp_raise_msg(&mp_type_OSError, msg); +} NORETURN void mp_raise_NotImplementedError(const compressed_string_t *msg) { mp_raise_msg(&mp_type_NotImplementedError, msg); diff --git a/py/runtime.h b/py/runtime.h index 9c7ffc02f..54f6a3270 100644 --- a/py/runtime.h +++ b/py/runtime.h @@ -158,6 +158,7 @@ NORETURN void mp_raise_RuntimeError(const compressed_string_t *msg); NORETURN void mp_raise_ImportError(const compressed_string_t *msg); NORETURN void mp_raise_IndexError(const compressed_string_t *msg); NORETURN void mp_raise_OSError(int errno_); +NORETURN void mp_raise_OSError_msg(const compressed_string_t *msg); NORETURN void mp_raise_NotImplementedError(const compressed_string_t *msg); NORETURN void mp_raise_recursion_depth(void); -- cgit v1.2.3