mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 08:55:36 +00:00
Address Copilot review comments
- Fix crash_handler_has_data docstring: returns true for crash reset reason (exception/WDT), not dependent on RTC backtrace presence - Always log numeric exccause in fallback branch for unexpected causes
This commit is contained in:
@@ -186,7 +186,7 @@ void crash_handler_log() {
|
||||
ESP_LOGE(TAG, " Reason: %s - %s (exccause=%" PRIu32 ")", LOG_STR_ARG(get_reset_reason(resetInfo.reason)),
|
||||
LOG_STR_ARG(cause), exccause);
|
||||
} else {
|
||||
ESP_LOGE(TAG, " Reason: %s", LOG_STR_ARG(get_reset_reason(resetInfo.reason)));
|
||||
ESP_LOGE(TAG, " Reason: %s (exccause=%" PRIu32 ")", LOG_STR_ARG(get_reset_reason(resetInfo.reason)), exccause);
|
||||
}
|
||||
ESP_LOGE(TAG, " PC: 0x%08" PRIX32, resetInfo.epc1);
|
||||
if (resetInfo.reason == REASON_EXCEPTION_RST) {
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace esphome::esp8266 {
|
||||
/// Log crash data if a crash was detected on previous boot.
|
||||
void crash_handler_log();
|
||||
|
||||
/// Returns true if crash data was found this boot.
|
||||
/// Returns true if the previous boot was a crash (exception, WDT, or soft WDT).
|
||||
bool crash_handler_has_data();
|
||||
|
||||
} // namespace esphome::esp8266
|
||||
|
||||
Reference in New Issue
Block a user