Add SystemExit exception and use it in unix/ and stmhal/ ports.

Addresses issue #598.
This commit is contained in:
Damien George
2014-05-24 23:32:19 +01:00
parent ee3fd46f13
commit 7a4ddd2428
5 changed files with 10 additions and 4 deletions

View File

@@ -159,7 +159,7 @@ const mp_obj_type_t mp_type_ ## exc_name = { \
// List of all exceptions, arranged as in the table at:
// http://docs.python.org/3.3/library/exceptions.html
MP_DEFINE_EXCEPTION_BASE(BaseException)
//MP_DEFINE_EXCEPTION(SystemExit, BaseException)
MP_DEFINE_EXCEPTION(SystemExit, BaseException)
//MP_DEFINE_EXCEPTION(KeyboardInterrupt, BaseException)
MP_DEFINE_EXCEPTION(GeneratorExit, BaseException)
MP_DEFINE_EXCEPTION(Exception, BaseException)