From c8b60f013b9d624a74ad502460f2bc7d00c39644 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 20 Apr 2015 13:29:31 +0000 Subject: 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. --- py/obj.h | 1 + 1 file changed, 1 insertion(+) (limited to 'py/obj.h') diff --git a/py/obj.h b/py/obj.h index 86f560ff51..11c0198bb9 100644 --- a/py/obj.h +++ b/py/obj.h @@ -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 -- cgit v1.2.3