From 76f06de96dbdc4274eb059efe1ce2020f9921835 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 9 Feb 2014 13:17:36 +0200 Subject: [PATCH] Add NotImplementedError. --- py/qstrdefs.h | 1 + py/runtime.c | 1 + 2 files changed, 2 insertions(+) diff --git a/py/qstrdefs.h b/py/qstrdefs.h index b90c5023de..afd238c1ae 100644 --- a/py/qstrdefs.h +++ b/py/qstrdefs.h @@ -36,6 +36,7 @@ Q(IndentationError) Q(IndexError) Q(KeyError) Q(NameError) +Q(NotImplementedError) Q(OSError) Q(SyntaxError) Q(TypeError) diff --git a/py/runtime.c b/py/runtime.c index 2f65186a0d..ab83e380cc 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -177,6 +177,7 @@ void rt_init(void) { mp_map_add_qstr(&map_builtins, MP_QSTR_OverflowError, mp_obj_new_exception(MP_QSTR_OverflowError)); mp_map_add_qstr(&map_builtins, MP_QSTR_OSError, mp_obj_new_exception(MP_QSTR_OSError)); mp_map_add_qstr(&map_builtins, MP_QSTR_AssertionError, mp_obj_new_exception(MP_QSTR_AssertionError)); + mp_map_add_qstr(&map_builtins, MP_QSTR_NotImplementedError, mp_obj_new_exception(MP_QSTR_NotImplementedError)); mp_map_add_qstr(&map_builtins, MP_QSTR_StopIteration, mp_obj_new_exception(MP_QSTR_StopIteration)); // built-in objects