mirror of
https://github.com/micropython/micropython.git
synced 2026-01-09 13:40:31 +01:00
py: Add module/function/class name to exceptions.
Exceptions know source file, line and block name. Also tidy up some debug printing functions and provide a global flag to enable/disable them.
This commit is contained in:
4
py/obj.h
4
py/obj.h
@@ -273,8 +273,8 @@ machine_int_t mp_obj_int_get_checked(mp_obj_t self_in);
|
||||
// exception
|
||||
extern const mp_obj_type_t exception_type;
|
||||
qstr mp_obj_exception_get_type(mp_obj_t self_in);
|
||||
void mp_obj_exception_set_source_info(mp_obj_t self_in, qstr file, machine_uint_t line);
|
||||
void mp_obj_exception_get_source_info(mp_obj_t self_in, qstr *file, machine_uint_t *line);
|
||||
void mp_obj_exception_set_source_info(mp_obj_t self_in, qstr file, machine_uint_t line, qstr block);
|
||||
void mp_obj_exception_get_source_info(mp_obj_t self_in, qstr *file, machine_uint_t *line, qstr *block);
|
||||
|
||||
// str
|
||||
extern const mp_obj_type_t str_type;
|
||||
|
||||
Reference in New Issue
Block a user