diff options
| author | IhorNehrutsa <Ihor.Nehrutsa@gmail.com> | 2023-02-28 23:15:31 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-09-18 11:26:43 +1000 |
| commit | 00930b213e55f4396c1e255092f09bdb8dd8c16f (patch) | |
| tree | 2348f607ad26859bd342e3e45e36edb0512805f5 /py | |
| parent | b0e03b3e07f4077d1686da0a2dcee3686e4a5f9e (diff) | |
esp32/mphalport: Add function/line/file info to check_esp_err exception.
Currently, check_esp_err() raises an exception without a location in the
source code, eg:
Traceback (most recent call last):
File "<stdin>", line 8, in <module>
OSError: (-258, 'ESP_ERR_INVALID_ARG')
This commit allows additional error reporting (function, line and file) to
be enabled via detailed exceptions. Change the error reporting config to
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_DETAILED)
and then exception messages from IDF errors look like:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: (-258, "0x0102 ESP_ERR_INVALID_ARG in function 'set_duty_u16'
at line 342 in file './machine_pwm.c'")
Signed-off-by: Ihor Nehrutsa <IhorNehrutsa@gmail.com>
Diffstat (limited to 'py')
0 files changed, 0 insertions, 0 deletions
