esp_err_to_name (IDFGH-7793) (#78)

fix(esp-modem): Use err_to_name to log error message on error
This commit is contained in:
diplfranzhoepfinger
2022-07-18 17:08:15 +02:00
committed by GitHub
parent 973837dd66
commit d1129f3d19
4 changed files with 25 additions and 2 deletions

View File

@ -22,7 +22,7 @@
action; \
} catch (::esp_modem::esp_err_exception& e) { \
esp_err_t err = e.get_err_t(); \
ESP_LOGE(TAG, "%s: Exception caught with ESP err_code=%d", __func__, err); \
ESP_LOGE(TAG, "%s: Exception caught with ESP err_code=%d %s", __func__, err, esp_err_to_name(err)); \
ESP_LOGE(TAG, "%s", e.what()); \
action; \
}