diff options
| author | Damien George <damien@micropython.org> | 2022-09-19 10:35:12 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-09-19 23:25:26 +1000 |
| commit | cc588ac3a91a16807242347e8b182d4bc8b7f139 (patch) | |
| tree | 4d21a6ba469344311c3cc3ba135c6a3c98966af3 /py/runtime.h | |
| parent | 15d0615d5cad430930d160a8ca3e809d7b82da32 (diff) | |
py/runtime: Add mp_raise_OSError_with_filename helper function.
Useful when more detail is needed for an OSError associated with a file.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/runtime.h')
| -rw-r--r-- | py/runtime.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/py/runtime.h b/py/runtime.h index 779b66f2b..36b3caa6c 100644 --- a/py/runtime.h +++ b/py/runtime.h @@ -196,6 +196,7 @@ NORETURN void mp_raise_NotImplementedError(mp_rom_error_text_t msg); 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_OSError_with_filename(int errno_, const char *filename); NORETURN void mp_raise_recursion_depth(void); #if MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG |
