py: Introduce and use mp_raise_type_arg helper.

To reduce code size.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2021-07-14 22:56:52 +10:00
parent bb00125aaa
commit 38a204ed96
10 changed files with 21 additions and 17 deletions

View File

@@ -184,6 +184,7 @@ NORETURN void mp_raise_TypeError(mp_rom_error_text_t msg);
NORETURN void mp_raise_NotImplementedError(mp_rom_error_text_t msg);
#endif
NORETURN void mp_raise_type_arg(const mp_obj_type_t *exc_type, mp_obj_t arg);
NORETURN void mp_raise_StopIteration(mp_obj_t arg);
NORETURN void mp_raise_OSError(int errno_);
NORETURN void mp_raise_recursion_depth(void);