diff options
author | Damien George <damien.p.george@gmail.com> | 2015-04-20 13:29:31 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-04-20 13:29:31 +0000 |
commit | c8b60f013b9d624a74ad502460f2bc7d00c39644 (patch) | |
tree | 4fdc71a6e6963961e0591b3abc621d672bb1c645 /py/obj.h | |
parent | 2bb5f41611ddc90cf44090e87efd94523580008b (diff) | |
download | micropython-c8b60f013b9d624a74ad502460f2bc7d00c39644.tar.gz micropython-c8b60f013b9d624a74ad502460f2bc7d00c39644.zip |
py: Make viper codegen raise proper exception (ViperTypeError) on error.
This fixes a long standing problem that viper code generation gave
terrible error messages, and actually no errors on pyboard where
assertions are disabled.
Now all compile-time errors are raised as proper Python exceptions, and
are of type ViperTypeError.
Addresses issue #940.
Diffstat (limited to 'py/obj.h')
-rw-r--r-- | py/obj.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -434,6 +434,7 @@ extern const mp_obj_type_t mp_type_SystemExit; extern const mp_obj_type_t mp_type_TypeError; extern const mp_obj_type_t mp_type_UnicodeError; extern const mp_obj_type_t mp_type_ValueError; +extern const mp_obj_type_t mp_type_ViperTypeError; extern const mp_obj_type_t mp_type_ZeroDivisionError; // Constant objects, globally accessible |