summaryrefslogtreecommitdiff
path: root/py/runtime.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2020-08-21 11:00:02 -0700
committerScott Shawcroft <scott@tannewt.org>2020-08-21 11:00:02 -0700
commit701e80a0252dbb63d64830a8d55f76b6296cb647 (patch)
tree1d1c9da3050887388f3fc0acd84f82f70f143ffa /py/runtime.c
parent80b15f6b3b8bc513e8edcec48a0c97205be27fd3 (diff)
Make socket reads interruptable
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/runtime.c b/py/runtime.c
index 216432ea4..e63e2337d 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -1602,6 +1602,10 @@ NORETURN void mp_raise_OSError_msg_varg(const compressed_string_t *fmt, ...) {
va_end(argptr);
}
+NORETURN void mp_raise_ConnectionError(const compressed_string_t *msg) {
+ mp_raise_msg(&mp_type_ConnectionError, msg);
+}
+
NORETURN void mp_raise_BrokenPipeError(void) {
nlr_raise(mp_obj_new_exception_arg1(&mp_type_BrokenPipeError, MP_OBJ_NEW_SMALL_INT(MP_EPIPE)));
}