summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/main.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-05-24 23:32:19 +0100
committerDamien George <damien.p.george@gmail.com>2014-05-24 23:32:19 +0100
commit7a4ddd24281a7e21eeaa697644418015cf4dd650 (patch)
tree6e1e87da8bee4f94539b98625b4deb6fd9ececd4 /stmhal/main.c
parentee3fd46f1383e984c968c4a82d634d7b0cea49b8 (diff)
downloadmicropython-7a4ddd24281a7e21eeaa697644418015cf4dd650.tar.gz
micropython-7a4ddd24281a7e21eeaa697644418015cf4dd650.zip
Add SystemExit exception and use it in unix/ and stmhal/ ports.
Addresses issue #598.
Diffstat (limited to 'stmhal/main.c')
-rw-r--r--stmhal/main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/stmhal/main.c b/stmhal/main.c
index a0ee4dab44..41ebaf3bb5 100644
--- a/stmhal/main.c
+++ b/stmhal/main.c
@@ -556,7 +556,6 @@ STATIC NORETURN mp_obj_t mp_sys_exit(uint n_args, const mp_obj_t *args) {
if (n_args > 0) {
rc = mp_obj_get_int(args[0]);
}
- nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_NotImplementedError,
- "sys.exit(%d) called, is not fully implemented", rc));
+ nlr_raise(mp_obj_new_exception_arg1(&mp_type_SystemExit, mp_obj_new_int(rc)));
}
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_sys_exit_obj, 0, 1, mp_sys_exit);