Default value of esp_err_t
Posted: Sat Feb 21, 2026 1:29 pm
Hello,
I want to start by saying i am a beginner...
Why is the default/first value of esp_err_t: ESP_OK?
That means if not handled correctly by some stupid overlooked thing it would be ESP_OK.
I would rather it be ESP_FAIL: its better that something goes right but it reports it as false (ESP_FAIL), then to have it go wrong but report that it got right (ESP_OK).
I ask this question not because i think it is wrong, but because i am genuinely curious why this is.
What are your thoughts on this?
I want to start by saying i am a beginner...
Why is the default/first value of esp_err_t: ESP_OK?
That means if not handled correctly by some stupid overlooked thing it would be ESP_OK.
I would rather it be ESP_FAIL: its better that something goes right but it reports it as false (ESP_FAIL), then to have it go wrong but report that it got right (ESP_OK).
I ask this question not because i think it is wrong, but because i am genuinely curious why this is.
What are your thoughts on this?