-
- Downloads
py/warning: Support categories for warnings.
Python defines warnings as belonging to categories, where category is a warning type (descending from exception type). This is useful, as e.g. allows to disable warnings selectively and provide user-defined warning types. So, implement this in MicroPython, except that categories are represented just with strings. However, enough hooks are left to implement categories differently per-port (e.g. as types), without need to patch each and every usage.
Showing
- extmod/modlwip.c 1 addition, 1 deletionextmod/modlwip.c
- ports/unix/mpconfigport_coverage.h 1 addition, 0 deletionsports/unix/mpconfigport_coverage.h
- ports/zephyr/modusocket.c 1 addition, 1 deletionports/zephyr/modusocket.c
- py/mpconfig.h 16 additions, 0 deletionspy/mpconfig.h
- py/obj.c 1 addition, 1 deletionpy/obj.c
- py/runtime.h 3 additions, 1 deletionpy/runtime.h
- py/vm.c 1 addition, 1 deletionpy/vm.c
- py/warning.c 8 additions, 3 deletionspy/warning.c
Loading
Please register or sign in to comment