summaryrefslogtreecommitdiffstatshomepage
path: root/py/runtime.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-18 14:15:48 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-18 14:15:48 +0000
commit632cf5710ca49cdcc4593672650ca53092dd435c (patch)
tree3e0e9a286e0f6eadda8b3f9de91642c1c4e2d2d9 /py/runtime.c
parent20006dbba9d2d84ead036fdfab7190e88b2337ce (diff)
parentd26b379eec155ddd7a4aa64057c3d0507eee79f5 (diff)
downloadmicropython-632cf5710ca49cdcc4593672650ca53092dd435c.tar.gz
micropython-632cf5710ca49cdcc4593672650ca53092dd435c.zip
Merge branch 'master' of github.com:dpgeorge/micropython
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/py/runtime.c b/py/runtime.c
index aa1b83a67f..89dbe7ab6a 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -89,6 +89,9 @@ void rt_init(void) {
mp_map_add_qstr(&map_builtins, MP_QSTR_TypeError, mp_obj_new_exception(MP_QSTR_TypeError));
mp_map_add_qstr(&map_builtins, MP_QSTR_SyntaxError, mp_obj_new_exception(MP_QSTR_SyntaxError));
mp_map_add_qstr(&map_builtins, MP_QSTR_ValueError, mp_obj_new_exception(MP_QSTR_ValueError));
+ // Somehow CPython managed to have OverflowError not inherit from ValueError ;-/
+ // TODO: For MICROPY_CPYTHON_COMPAT==0 use ValueError to avoid exc proliferation
+ 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));